-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Network: How to save new positions for each nodes after draging #2017
Comments
Once the dragging event stops, you can do this:
|
Thanks dragonzone, I think I get the idea how to get nodes X and Y. I will save the value in somewhere. Can you please also advise me how to set x and y with fixed position when build the nodes? I tired to find some sample codes but I could not. Thanks. |
Here is an example you can check out: https://jsfiddle.net/tsee1ap0/1/ Note: all this information you can get from the documentation here: http://visjs.org/docs/network/ |
Another example is here - http://visjs.org/examples/network/exampleApplications/nodeLegend.html but bear in mind this issue - #1857 which is fixed in the develop branch. |
Thanks dragonzone & Stexxen, very good examples. I will try to finish my assignments. |
I think we can close this. |
Hello Everyone, I'm new to Vis js. Is it possible to get dragged nodes only?? If yes can you please share the code. |
I'm new to vis, hope someone can help me on my question.
In my codes for drawing the network chart: var network = new vis.Network(container, data, options);
each time re-open the network chart, the nodes positions are randomly set, which is fine for me. (I didn't set fixed for individual node)
But sometimes my user want to re-position the nodes by draging, then how can I save the adjusted position for all nodes? Then after refresh or re-open the page/chart, they can see the nodes in the saved positions.
Thanks.
The text was updated successfully, but these errors were encountered: