lib/psd/nodes/layer.rb in psd-3.2.0 vs lib/psd/nodes/layer.rb in psd-3.2.1

- old
+ new

@@ -14,31 +14,21 @@ width == 0 || height == 0 end # Exports this layer to a Hash. def to_hash - hash = super.merge({ + super.merge({ type: :layer, text: @layer.text, ref_x: reference_point.x, ref_y: reference_point.y, mask: @layer.mask.to_hash, image: { width: @layer.image.width, height: @layer.image.height, channels: @layer.channels_info - }, - layer_comps: {} - }) - - root.psd.layer_comps.each do |comp| - hash[:layer_comps][comp[:name]] = { - visible: visible_in_comp?(comp[:id]), - position: position_in_comp(comp[:id]) } - end - - hash + }) end # In case the layer doesn't have a reference point def reference_point @layer.reference_point || Struct.new(:x, :y).new(0, 0) \ No newline at end of file