psd 1.4.1 → 1.4.2

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: c280041aec3dddd0d1d36ffc6ed04a508fee595b
4
- data.tar.gz: fb26c8a487af49e440b1f33c1fb22d439ffbe2af
3
+ metadata.gz: 2f9c53ce033fdba16caf70bf522d538ced6658f4
4
+ data.tar.gz: bd3827fcd93cf3a44c517b8e76504e4b7302fad0
5
5
  SHA512:
6
- metadata.gz: 95b60cce05f150433a0b62eb87bb33cd6a77c437ef49ab133b8c9ad44934f2112a74ef5c3de12f53495857eb252c108af38942737030d65c52bfcc6182ac56f2
7
- data.tar.gz: bafa5dd0214d03bd39c34e19218a76d72c33b50bd4a9e2a3e33358be4b8d3a49d344f161a5d8896b5138b7ccbc36c187968fe76b4ba6d558bf63d976bbd7f9da
6
+ metadata.gz: f5e146a36e2630d1833ab163dee71137cc469c46f2fbe6c766f2b170a182e33974cb911208c0fb7b9e9ffac62a97c764c07b6e9ba3eb77a5ab9459f72b01d395
7
+ data.tar.gz: 04f8f7140acfc9c972432723721603bc4650572e526bae647da386308b49a6fa734447149a945a6f1bbbd90e3428365cd280f4dbfd389d7c140784fc7e8a1b0e
@@ -12,7 +12,7 @@ class PSD
12
12
  # Default properties that all nodes contain
13
13
  PROPERTIES = [:name, :left, :right, :top, :bottom, :height, :width]
14
14
 
15
- attr_accessor :parent, :children, :layer
15
+ attr_accessor :parent, :children, :layer, :force_visible
16
16
 
17
17
  def initialize(layers=[])
18
18
  @children = []
@@ -20,14 +20,16 @@ class PSD
20
20
  layer.parent = self
21
21
  @children << layer
22
22
  end
23
+
24
+ @force_visible = false
23
25
  end
24
26
 
25
27
  def hidden?
26
- !@layer.visible?
28
+ !visible?
27
29
  end
28
30
 
29
31
  def visible?
30
- @layer.visible?
32
+ force_visible || @layer.visible?
31
33
  end
32
34
 
33
35
  def psd
@@ -49,13 +49,14 @@ class PSD
49
49
  node.children.select! do |c|
50
50
  c
51
51
  .metadata
52
- .data[:layer_comp]['layerSettings'].map { |l| !l.has_key?('enab') || l['enab'] ? l['compList'] : nil }
52
+ .data[:layer_comp]['layerSettings'].map { |l| !l.has_key?('enab') || l['enab'] == true ? l['compList'] : nil }
53
53
  .flatten
54
54
  .compact
55
55
  .include?(id)
56
56
  end
57
57
 
58
58
  node.children.each do |c|
59
+ c.force_visible = true
59
60
  filter_for_comp!(id, c) if c.is_a?(PSD::Node::Group)
60
61
  end
61
62
  end
@@ -1,3 +1,3 @@
1
1
  class PSD
2
- VERSION = "1.4.1"
2
+ VERSION = "1.4.2"
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: 1.4.1
4
+ version: 1.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan LeFevre