问题
I am working on some graph visualizations, and I am using the JavaScript library graph Dracula. Now, with this library, when I want to move a node I have to click the node I want to move and move it on the desired place (with drag and drop). But, what I want to do is to select more nodes and move all of them. I can't figure out how to do this, since I am not so experienced in JavaScript programming. So, my question is:
- How can I select multiple nodes with rectangle selection and move them?
- How can I select multiple nodes with, say, Ctrl + left click and select more nodes and then move them?
回答1:
By the looks of things, almost all of Dracula's
graph rendering is really managed by RaphaelJS.
In which case, things may be quite a bit easier for you. It seems other people have asked how to move elements in RaphaelJS.
来源:https://stackoverflow.com/questions/14421128/how-can-i-make-rectangle-selection-on-multiple-nodes-with-graph-dracula