lib/glimmer/libui/shape/line.rb in glimmer-dsl-libui-0.7.8 vs lib/glimmer/libui/shape/line.rb in glimmer-dsl-libui-0.8.0

- old
+ new

@@ -59,15 +59,19 @@ self.end_x += x_delta self.end_y += y_delta end def perfect_shape - perfect_shape_dependencies = [x, y, end_x, end_y] - if perfect_shape_dependencies != @perfect_shape_dependencies - x, y, end_x, end_y = @perfect_shape_dependencies = perfect_shape_dependencies - @perfect_shape = PerfectShape::Line.new(points: [x, y, end_x, end_y].compact) + the_perfect_shape_dependencies = perfect_shape_dependencies + if the_perfect_shape_dependencies != @perfect_shape_dependencies + absolute_x, absolute_y, absolute_end_x, absolute_end_y = @perfect_shape_dependencies = the_perfect_shape_dependencies + @perfect_shape = PerfectShape::Line.new(points: [absolute_x, absolute_y, absolute_end_x, absolute_end_y].compact) end @perfect_shape + end + + def perfect_shape_dependencies + [absolute_x, absolute_y, absolute_end_x, absolute_end_y] end end end end end