psd 3.2.0 → 3.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f4bd38eaf1619d328b37f11d93117c313c645bd6
4
- data.tar.gz: 4b54b449211063657e903917e20f0c78c5fd3297
3
+ metadata.gz: 2a7b8aa2fdc727961204ba934d689d5216a5a8f4
4
+ data.tar.gz: ab928409ec35488d7ec85115e08be60c0b119145
5
5
  SHA512:
6
- metadata.gz: e4d989a86acfc3b2b3b7f3dcea3bad859aabc0e3cdbf74d7cc165decf5b490d75933368f6aff7ca7d4c9dbb87c0d8d67ed5bb393acc7ed4bc4d9fa75f6cf8de5
7
- data.tar.gz: 0d8dc9000a99878c9f2806faba5d82a1dc387f01a6c201263643059154d836702e76b2228d9b4c9bc1daaa1a4ad1d40d9b4629137f6c726863604ce9e719fc50
6
+ metadata.gz: cf126da9f345dcabf2cff7774fce4202eb12cc72cf8261f4e50f9bb3b9c4a3b32d8b322506a5f0b1860737f5db3025f6a8eb98d7e8f0d59450e01aba9c2ba606
7
+ data.tar.gz: 95507b3c5a2d302e3ff42ef51b05ed4a7953ad0aed399634af50b12cda8c8e339a928f77bafaa42a6cf37f6630e3a995686970d2b7391c43279fb8aed1fd03fe
data/lib/psd/node.rb CHANGED
@@ -106,13 +106,21 @@ class PSD
106
106
  type: nil,
107
107
  visible: visible?,
108
108
  opacity: @layer.opacity / 255.0,
109
- blending_mode: @layer.blending_mode
109
+ blending_mode: @layer.blending_mode,
110
+ layer_comps: {}
110
111
  }
111
112
 
112
113
  PROPERTIES.each do |p|
113
114
  hash[p] = self.send(p)
114
115
  end
115
116
 
117
+ root.psd.layer_comps.each do |comp|
118
+ hash[:layer_comps][comp[:name]] = {
119
+ visible: visible_in_comp?(comp[:id]),
120
+ position: position_in_comp(comp[:id])
121
+ }
122
+ end
123
+
116
124
  hash
117
125
  end
118
126
 
@@ -16,7 +16,7 @@ class PSD
16
16
 
17
17
  # Exports this layer to a Hash.
18
18
  def to_hash
19
- hash = super.merge({
19
+ super.merge({
20
20
  type: :layer,
21
21
  text: @layer.text,
22
22
  ref_x: reference_point.x,
@@ -26,18 +26,8 @@ class PSD
26
26
  width: @layer.image.width,
27
27
  height: @layer.image.height,
28
28
  channels: @layer.channels_info
29
- },
30
- layer_comps: {}
31
- })
32
-
33
- root.psd.layer_comps.each do |comp|
34
- hash[:layer_comps][comp[:name]] = {
35
- visible: visible_in_comp?(comp[:id]),
36
- position: position_in_comp(comp[:id])
37
29
  }
38
- end
39
-
40
- hash
30
+ })
41
31
  end
42
32
 
43
33
  # In case the layer doesn't have a reference point
data/lib/psd/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  class PSD
2
- VERSION = "3.2.0"
2
+ VERSION = "3.2.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: psd
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.2.0
4
+ version: 3.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan LeFevre