Skip to content
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

Listening to Anchor Events and Saving Changes in Svelvet #517

Open
fdsgdshn opened this issue Aug 16, 2024 · 0 comments
Open

Listening to Anchor Events and Saving Changes in Svelvet #517

fdsgdshn opened this issue Aug 16, 2024 · 0 comments

Comments

@fdsgdshn
Copy link

Hello everyone,

I've just started working with Svelvet / Svelte, and I have a few small questions that I don't quite understand. I would really appreciate any help you can provide.

  1. I don't know how to listen to anchor events. I've gone through some of the documentation, but I couldn't find any information on this. For example, there's already a "nodeClicked" event defined for nodes, and I can track when a node is clicked and get the corresponding node's ID. But how can I track when an anchor element is clicked? How can I get its ID?

  2. I've made some changes to a model I've created on a localhost via Svelvet, such as adding new nodes and creating edge connections. However, when I refresh the page, all these changes are lost, and I have to start from scratch. How can I save the changes I've made with Svelvet? I want the most recent changes to always be up-to-date, for example, when I press the "save" button, it should store everything. I thought about using LocalStorage, but unfortunately, I noticed some errors occur when saving arrays.

I'm open to any support you can provide on these issues, and I thank you in advance for your help.

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

1 participant