lib/teacup/stylesheet_extensions/constraints.rb in teacup-1.2.5 vs lib/teacup/stylesheet_extensions/constraints.rb in teacup-1.2.7

- old
+ new

@@ -23,11 +23,11 @@ def constrain_right(x) Teacup::Constraint.new(:self, :right).equals(:superview, :right).plus(x) end - def constrain_center_x(x) + def constrain_center_x(x=0) Teacup::Constraint.new(:self, :center_x).equals(:superview, :center_x).plus(x) end def constrain_top(y) Teacup::Constraint.new(:self, :top).equals(:superview, :top).plus(y) @@ -35,10 +35,10 @@ def constrain_bottom(y) Teacup::Constraint.new(:self, :bottom).equals(:superview, :bottom).plus(y) end - def constrain_center_y(y) + def constrain_center_y(y=0) Teacup::Constraint.new(:self, :center_y).equals(:superview, :center_y).plus(y) end def constrain_width(width) Teacup::Constraint.new(:self, :width).equals(width)