Closed GoogleCodeExporter closed 8 years ago
i think this is just caused by the asynchronous loading of the images. look
at this jsfiddle:
http://jsfiddle.net/sporritt/AX7d9/6/
there's a listener bound to the image's 'load' event. when it fires, the src
property has been set.
Original comment by simon.po...@gmail.com
on 16 Nov 2011 at 12:34
Oh! That's right, but the images still be different than I specified in the
options of the addEndpoint call...
Original comment by daniel.martinez.ruiz
on 16 Nov 2011 at 12:46
jsPlumb.connect uses the default endpoint that you've setup - the green one.
this is the image that is reported in the alert.
the reason is that your connect call uses the ids of the two elements, so it
creates new endpoints. those ones you've already added are ignored.
if you want to use the endpoints you've created as the source and target,
you'll have to pass them back from the addBlock method or something:
http://jsfiddle.net/sporritt/AX7d9/8/
Original comment by simon.po...@gmail.com
on 16 Nov 2011 at 1:03
Wow, I didn't know that that was the behaviour of the connect function. So, I
was doing the connection in the wrong way. Thanks, Simon, I will use the
function in this manner.
Please, discard this issue. It was my fault, not a really issue.
Thanks again for the support.
Best regards.
Original comment by daniel.martinez.ruiz
on 16 Nov 2011 at 1:09
ok cool. closing this out.
Original comment by simon.po...@gmail.com
on 16 Nov 2011 at 9:41
Original issue reported on code.google.com by
daniel.martinez.ruiz
on 16 Nov 2011 at 12:11