diff --git a/chameleonic.p8 b/chameleonic.p8 index a2219d2..d4f9d99 100644 --- a/chameleonic.p8 +++ b/chameleonic.p8 @@ -679,8 +679,13 @@ function rope:drag( for x,y in self:_rast( anc.x,anc.y,x,y ) do - self:_drag1(i(),x,y) - self:_tidy_up_gen() + local a=self:_anc(i()) + if not (_point_eq(a, {x=x,y=y})) then + a.x=x + a.y=y + a.dirty=true + self:_tidy_up_gen() + end end end @@ -748,17 +753,6 @@ function rope:_tidy_up_gen() end end -function rope:_drag1( - i,x,y -) - local a=self:_anc(i) - if (_point_eq(a, {x=x,y=y})) return - - a.x=x - a.y=y - a.dirty=true -end - function rope:_find_needed_anchors(i) if (i<=0) return false if (#self.ancs+1