Graphin icon indicating copy to clipboard operation
Graphin copied to clipboard

Layout is updated when a new node is added

Open Aycaa opened this issue 2 years ago • 1 comments

Describe the bug

Hello, We are using the Graphin library in our project. We add a node according to our scenario and the graphical layout is refreshed again. I'm losing my script that I used to work on canvas. The nodes I drag are shaped according to the order I specified in the graph library. How can I prevent this? I am attaching a sample screenshot of our application below. Thanks in advance for helping. 1 2

Sample code: let c = { id: id, label: "TEST", type: "graphin-circle", } }; graph.addItem("node", c); graph.updateLayout("force");

Expected behavior

I want node added without rearranging the canvas.

Screenshots or Videos

1 2

Aycaa avatar Apr 27 '22 20:04 Aycaa

Use preset layout type with specific X and Y positions.

mix0000 avatar Apr 28 '22 09:04 mix0000