Skip to content

Saving the position of the NODES after dragging #881

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
pninarubin opened this issue Jul 1, 2024 · 2 comments
Open

Saving the position of the NODES after dragging #881

pninarubin opened this issue Jul 1, 2024 · 2 comments

Comments

@pninarubin
Copy link

Hi,
I have nodes, and when I drag them to another location on the canvas
After saving, they are not saved in the new location but remain as they were.
If you have a solution for me, I have tried numerous things with no success.
I'd be happy .

@jerosoler
Copy link
Owner

Where do you save the nodes, how do you load them again?

Do you use the export/import method?

@pninarubin
Copy link
Author

in the drag function
In the end I give this line:
this.process.json = JSON.stringify(this.editor.export());
And in the save function all the
this.process has been sent to save.
He works after he guards me, he doesn't guard and the dead stay in the same place.
I tried to create a special listener for the drag using the 'nodeMoved' function that exists in your fria, but it didn't listen to it.
This is a problem for me and I would love to hear a solution.

This is the function I built and it doesn't work:
this.editor.on('nodeMoved', (id) => {
console.log(id);
this.movedNode(id);
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants