edemaine / cocreate

Cocreate Shared Whiteboard/Drawing
MIT License
209 stars 27 forks source link

Accidentally dragging outside board #68

Open edemaine opened 3 years ago

edemaine commented 3 years ago

When dragging with a tool such as line/rectangle/ellipse, if your cursor accidentally exits the window or even just the board (over some tools) but then comes back, the object is set in stone and you can't keep editing it. We should ideally detect returning in the same state as leaving, and continue it as a single action. I think it'd be enough to stop an action when entering, not when leaving, if certain criteria hold.

Is the criteria that e.pressure == 0? Or that e.buttons changed since the leave event?