draw2d icon indicating copy to clipboard operation
draw2d copied to clipboard

Connection leave drawing artefact if mouse leaves browser window during connect operation

Open icyield opened this issue 5 years ago • 1 comments

See for example https://freegroup.github.io/draw2d/index.html#/examples/port_semantic_group When connection a port if the mouse pointer is moved outside the browser and then returns a dashed line is left on the canvas after a connection is made. Seems browser independent as same issue in chrome macos and safari.

Screenshot 2020-06-03 at 12 42 05

Also seems to lose some other state information, for example cannot delete shapes, ports become unattached, etc ...

https://freegroup.github.io/draw2d/index.html#/examples/buildin_commandstack

Screenshot 2020-06-04 at 15 23 32

PS: Great work! Has the same issue in your brainbox simulator.

icyield avatar Jun 03 '20 11:06 icyield

A quick fix is to add mouseleave to the mouseup detection in Canvas.js:170 this.html.bind("mouseup touchend mouseleave", function (event) {

This changes more than just the connection dragging of course.

icyield avatar Jun 04 '20 21:06 icyield