lib/rabbit/element/base.rb in rabbit-1.0.6 vs lib/rabbit/element/base.rb in rabbit-1.0.7

- old
+ new

@@ -105,10 +105,12 @@ end def compile_horizontal(canvas, x, y, w, h) if do_horizontal_centering? do_horizontal_centering(canvas, x, y, w, h) + else + reset_horizontal_centering(canvas, x, y, w, h) end end def prop_set(name, *values) name = normalize_property_name(name) @@ -280,19 +282,24 @@ @vertical_centering or (parent and parent.do_horizontal_centering?) end def horizontal_centering=(new_value) - dirty! if @horizontal_centering != new_value + if @horizontal_centering != new_value + dirty! + end @horizontal_centering = new_value end def vertical_centering=(new_value) dirty! if @vertical_centering != new_value @vertical_centering = new_value end def do_horizontal_centering(canvas, x, y, w, h) + end + + def reset_horizontal_centering(canvas, x, y, w, h) end def previous_element sibling_element(-1) end