# File: info.coffee

Defined in: | lib/psd/layer

## Variables Summary

LAYER_INFO =

      {
        blendClippingElements: require('../layer_info/blend_clipping_elements.coffee'),
        blendInteriorElements: require('../layer_info/blend_interior_elements.coffee'),
        fillOpacity: require('../layer_info/fill_opacity.coffee'),
        gradientFill: require('../layer_info/gradient_fill.coffee'),
        layerId: require('../layer_info/layer_id.coffee'),
        layerNameSource: require('../layer_info/layer_name_source.coffee'),
        legacyTypetool: require('../layer_info/legacy_typetool.coffee'),
        locked: require('../layer_info/locked.coffee'),
        metadata: require('../layer_info/metadata.coffee'),
        name: require('../layer_info/unicode_name.coffee'),
        nestedSectionDivider: require('../layer_info/nested_section_divider.coffee'),
        objectEffects: require('../layer_info/object_effects.coffee'),
        sectionDivider: require('../layer_info/section_divider.coffee'),
        solidColor: require('../layer_info/solid_color.coffee'),
        typeTool: require('../layer_info/typetool.coffee'),
        vectorMask: require('../layer_info/vector_mask.coffee'),
        vectorOrigination: require('../layer_info/vector_origination.coffee'),
        vectorStroke: require('../layer_info/vector_stroke.coffee'),
        vectorStrokeContent: require('../layer_info/vector_stroke_content.coffee')
      }

module.exports =

      {
        parseLayerInfo: function() {
          var i, key, keyParseable, klass, length, name, pos, _results,
            __hasProp = {}.hasOwnProperty;
          _results = [];
          while (this.file.tell() < this.layerEnd) {
            this.file.seek(4, true);
            key = this.file.readString(4);
            length = Util.pad2(this.file.readInt());
            pos = this.file.tell();
            keyParseable = false;
            for (name in LAYER_INFO) {
              if (!__hasProp.call(LAYER_INFO, name)) continue;
              klass = LAYER_INFO[name];
              if (!klass.shouldParse(key)) {
                continue;
              }
              i = new klass(this, length);
              this.adjustments[name] = new LazyExecute(i, this.file).now('skip').later('parse').get();
              if (this[name] == null) {
                (function(_this) {
                  return (function(name) {
                    return _this[name] = function() {
                      return _this.adjustments[name];
                    };
                  });
                })(this)(name);
              }
              this.infoKeys.push(key);
              keyParseable = true;
              break;
            }
            if (!keyParseable) {
              _results.push(this.file.seek(length, true));
            } else {
              _results.push(void 0);
            }
          }
          return _results;
        }
      }

Quickly fuzzy find classes, mixins, methods, file:

- T Open fuzzy finder dialog

Control the navigation frame:

- L Toggle list view
- C Show class list
- I Show mixin list
- F Show file list
- M Show method list
- E Show extras list

You can focus and blur the search input:

- S Focus search input
- Esc Blur search input