psd
Version:
A general purpose Photoshop file parser.
38 lines (27 loc) • 803 B
text/coffeescript
LayerInfo = require '../layer_info.coffee'
module.exports = class NestedSectionDivider extends LayerInfo
: (key) -> key is 'lsct'
SECTION_DIVIDER_TYPES = [
'other'
'open folder'
'closed folder'
'bounding section divider'
]
constructor: (layer, length) ->
super(layer, length)
= false
= false
= null
= null
= null
parse: ->
code = .readInt()
= SECTION_DIVIDER_TYPES[code]
switch code
when 1, 2 then = true
when 3 then = true
return unless >= 12
.seek 4, true
= .readString(4)
return unless >= 16
= if .readInt() is 0 then 'normal' else 'scene group'