jetersu / jsplumb

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

question: custom dragging library, how to integrate into JsPlumb? #332

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Hi,

First of all, thanks for the great library. 

I'm trying to add multi-dragging to JsPlumb. (drag multiple nodes with one 
drag). I found a plugin for jQuery draggable which looks perfect for the case.
(https://github.com/someshwara/MultiDraggable)

Firstly I tried to use the plugin with any changes (still calling 
jsplumb.draggable function), but that obviously doesn't work - when dragging, 
not all the connections are redrawn.

Now I ended up with a repaint inside the multi-drag plugin. This works, but 
it's a bit laggy - when I drag very fast, we see that the endpoint floats in 
the document for a few milliseconds.  (jsFiddle below).

So I have the following questions:
- How do I integrate another dragging library without losing performance?
- how does jsplumb.draggable works? (of course I looking in the sourcecode 
already). Doens't it use a repaint?
- should I call another function then repaint?

JsFiddles:

- No multidragging: 
performance is very good
(try to drag fast)
http://jsfiddle.net/GYqtr/

- custom repaint: 
(try to drag fast)
redrawing is laggy, endpoint not connected to node every moment: 
http://jsfiddle.net/ZQcEc/

thanks in advance! 

ps: any ideas when 1.4.0 is being released?

ps2:
perhaps it is an idea to integrate the multidrag with your jsPlumb library? 
(when it performs well) - the only important setting for this library is 
'group'. Unfortunately, it only works with jQuery, so that could be a 
showstopper. 

Original issue reported on code.google.com by j.verdur...@2bmore.nl on 25 Mar 2013 at 5:58

GoogleCodeExporter commented 8 years ago
This belongs in the discussion group.

https://groups.google.com/forum/m/?fromgroups#!topic/jsplumb/D3iEBV0EpG0

Original comment by simon.po...@gmail.com on 25 Mar 2013 at 6:17

GoogleCodeExporter commented 8 years ago
I Agree. Thx for posting this on the discussion group already

Original comment by j.verdur...@2bmore.nl on 26 Mar 2013 at 1:34