lib/rabbit/element/container-element.rb in rabbit-1.0.6 vs lib/rabbit/element/container-element.rb in rabbit-1.0.7
- old
+ new
@@ -117,20 +117,20 @@
def compile_elements(canvas, x, y, w, h)
prev_is_inline = false
@elements.each do |element|
element.compile(canvas, x, y, w, h)
- if element.do_horizontal_centering?
- element.do_horizontal_centering(canvas, x, y, w, h)
- end
+ compile_horizontal(canvas, x, y, w, h)
x, y, w, h = element.draw(true)
end
end
def compile_horizontal(canvas, x, y, w, h)
@elements.each do |element|
if do_horizontal_centering? or element.do_horizontal_centering?
element.do_horizontal_centering(canvas, x, y, w, h)
+ else
+ element.reset_horizontal_centering(canvas, x, y, w, h)
end
end
end
def to_html(generator)