AbimannanMuthusamy / jsplumb

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

Getting UUID of endpoints of dragging element #86

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Is it possible to add some method to retrieve UUID of endpoints of the element 
we are dragging right now? I need it in order to renew the position of 
endpoints of dragged element when a container has scroll:auto. Thank you

Original issue reported on code.google.com by bakhtiyo...@gmail.com on 13 Jun 2011 at 9:22

GoogleCodeExporter commented 9 years ago
There is no formalised way in jsPlumb of registering a callback for when the 
user is dragging something, so there is currently no hook on which I could hang 
this functionality.  At least, that's if I am understanding your requirement 
correctly. You would like jsPlumb to fire events during the lifecycle of some 
drag event, is that correct? And these event callbacks would pass in 
information about what was currently being dragged?

Original comment by simon.po...@gmail.com on 14 Jun 2011 at 12:02

GoogleCodeExporter commented 9 years ago
What I wanted is just to get all UUIDs of endpoints of the selected 
element(DIV). Is it possible somehow to achieve? Thanks!!!

Original comment by bakhtiyo...@gmail.com on 15 Jun 2011 at 3:26

GoogleCodeExporter commented 9 years ago
how to use this method getUuid?

Original comment by bakhtiyo...@gmail.com on 15 Jun 2011 at 3:39

GoogleCodeExporter commented 9 years ago
it looks to me like you need this method to be added:

getEndpoints(some element);

which would return a list of Endpoint objects.

getUuid just gets an Endpoint's UUID:

http://jsplumb.org/doc/content.html#endpointUuids

Original comment by simon.po...@gmail.com on 15 Jun 2011 at 10:07

GoogleCodeExporter commented 9 years ago

Original comment by simon.po...@gmail.com on 24 Jun 2011 at 10:14

GoogleCodeExporter commented 9 years ago
just refreshed myself on the code around this stuff - there is already a method 
'getEndpoints', which takes either an element id or selector as argument, and 
returns you a list of Endpoints for that element.  you can then iterate those 
and call getUUID on each one.  

closing this issue.

Original comment by simon.po...@gmail.com on 26 Jun 2011 at 1:10