Closed philipjackson closed 2 years ago
Just hit this myself and thinking of how to fix it, what would @SilviaZeta and @philipjackson say to having two 'updateSplinePoint' functions?
https://github.com/gliff-ai/annotate/blob/452e74d7ba8daf14c524a9d352382bca45a700a6/src/annotation/index.ts#L323
The current one, which is @log
ged should be called on onClick
/onDoubleClick
/onMouseUp
events and then a not-logged one, e.g. updateSplinePointAndWait
function that is identical but not logged could be called on onMouseDown
/onMouseMove
events?
Implementation wise updateSplinePoint
could just call updateSplinePointAndWait
or whatever we call it?
@philipjackson do I remember correctly that you actually did something about this?
Yep, this was fixed on October 4th, looks like I forgot to link the issue: https://github.com/gliff-ai/annotate/pull/375
Describe the bug
Hitting undo after moving a spline point only shifts it back one tiny little bit at a time. This is because
updateSplinePoint
is being called inonMouseMove
rather thanonMouseUp
when the user finishes dragging, resulting in hundreds of little updates being logged in both the audit and undo arrays. Fixing this behaviour inSplineCanvas
will definitely be easier and better than somehow consolidating all those update actions into one.To Reproduce Steps to reproduce the behavior:
Expected behavior
Point moves back to where it was before you dragged it.