lib/geomotion/cg_rect.rb in geomotion-0.12.1 vs lib/geomotion/cg_rect.rb in geomotion-0.12.2
- old
+ new
@@ -183,10 +183,14 @@
def above(margin, height:height)
CGRect.new([self.x, self.y - height - margin], [self.width, height])
end
def below(margin = 0)
- CGRect.new([self.x, self.y + self.height + margin], self.size)
+ self.below(margin, height:self.height)
+ end
+
+ def below(margin, height:height)
+ CGRect.new([self.x, self.y + self.height + margin], [self.width, height])
end
def before(margin = 0)
self.before(margin, width:self.width)
end