dugarab / jsplumb

Automatically exported from code.google.com/p/jsplumb
0 stars 0 forks source link

Image endpoint remains in DOM if parent element is removed quickly enough #269

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I have an application where you can create create elements that contain image 
endpoints after being created. The application also supports undo/redo. If the 
user clicks on undo fast enough, image endpoint stay in the DOM.

See:
http://jsfiddle.net/maros_urbanec/T9vMV/

First click on the toggleElement button will create a box with an image 
endpoint. Second click will remove the element along with its endpoints. All 
works fine if you click on the button slow enough.
If you, however, click on toggleElement fast enough, the image stays there even 
if the box and the endpoints are deleted.

Looking into the code of Endpoints.Image, it always waits on the onLoad event, 
even if an image with the same URL has been successfully loaded before.

Original issue reported on code.google.com by urbanec....@gmail.com on 26 Jul 2012 at 10:22

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
1.3.11 version for testing:

http://jsfiddle.net/sporritt/ggtVa/3/

note in here a nicer way of deleting a set of Endpoints:

jsPlumb.selectEndpoints({element:$(".box")}).delete();

'selectEndpoints' was added in 1.3.11.

Original comment by simon.po...@gmail.com on 29 Jul 2012 at 5:21