sugarcube 0.7.4 → 0.7.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,7 +1,7 @@
1
1
  class UIView
2
2
 
3
3
  def to_s
4
- "#{self.class.name}(##{self.object_id}, #{self.frame.inspect}, "\
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
 
@@ -108,16 +108,16 @@ class UIView
108
108
 
109
109
  case direction
110
110
  when :left
111
- size = options[:size] || UIScreen.mainScreen.bounds.size.width
111
+ size = options[:size] || self.bounds.size.width
112
112
  delta_to([-size, 0], options, &after)
113
113
  when :right
114
- size = options[:size] || UIScreen.mainScreen.bounds.size.width
114
+ size = options[:size] || self.bounds.size.width
115
115
  delta_to([+size, 0], options, &after)
116
116
  when :up
117
- size = options[:size] || UIScreen.mainScreen.bounds.size.height
117
+ size = options[:size] || self.bounds.size.height
118
118
  delta_to([0, -size], options, &after)
119
119
  when :down
120
- size = options[:size] || UIScreen.mainScreen.bounds.size.height
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}"
@@ -1,3 +1,3 @@
1
1
  module SugarCube
2
- Version = '0.7.4'
2
+ Version = '0.7.6'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sugarcube
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.4
4
+ version: 0.7.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: