sugarcube 0.7.4 → 0.7.6
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/sugarcube/to_s/uiview.rb +1 -1
- data/lib/sugarcube/uiview.rb +4 -4
- data/lib/sugarcube/version.rb +1 -1
- metadata +1 -1
@@ -1,7 +1,7 @@
|
|
1
1
|
class UIView
|
2
2
|
|
3
3
|
def to_s
|
4
|
-
"#{self.class.name}(##{self.object_id}, #{self.frame.
|
4
|
+
"#{self.class.name}(##{self.object_id}, [[#{self.frame.origin.x}, #{self.frame.origin.y}],{#{self.frame.size.width} × #{self.frame.size.height}}], "\
|
5
5
|
"#{self.superview ? ' child of ' + self.superview.class.name + ' #' + self.superview.object_id.to_s : ''})"
|
6
6
|
end
|
7
7
|
|
data/lib/sugarcube/uiview.rb
CHANGED
@@ -108,16 +108,16 @@ class UIView
|
|
108
108
|
|
109
109
|
case direction
|
110
110
|
when :left
|
111
|
-
size = options[:size] ||
|
111
|
+
size = options[:size] || self.bounds.size.width
|
112
112
|
delta_to([-size, 0], options, &after)
|
113
113
|
when :right
|
114
|
-
size = options[:size] ||
|
114
|
+
size = options[:size] || self.bounds.size.width
|
115
115
|
delta_to([+size, 0], options, &after)
|
116
116
|
when :up
|
117
|
-
size = options[:size] ||
|
117
|
+
size = options[:size] || self.bounds.size.height
|
118
118
|
delta_to([0, -size], options, &after)
|
119
119
|
when :down
|
120
|
-
size = options[:size] ||
|
120
|
+
size = options[:size] || self.bounds.size.height
|
121
121
|
delta_to([0, +size], options, &after)
|
122
122
|
else
|
123
123
|
raise "Unknown direction #{direction.inspect}"
|
data/lib/sugarcube/version.rb
CHANGED