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

Support for node removal #5

Open
Glandos opened this issue Jul 25, 2022 · 6 comments
Open

Support for node removal #5

Glandos opened this issue Jul 25, 2022 · 6 comments

Comments

@Glandos
Copy link

Glandos commented Jul 25, 2022

Hi, currently, this (nice) plugin only watch for node adding, but when a node is removed, the HTML DOM node is not removed, leading to… garbage display.

Is it plan to handle node removal?

@mwri
Copy link
Owner

mwri commented Aug 20, 2022

Ah, good shout. Should be pretty trivial to fix. I guess there are two cases that should be handled, the data changes so there is no longer a 'dom' value, or the cytoscape node is actually removed from the graph.

@nielsboogaard
Copy link

nielsboogaard commented Aug 24, 2023

I've implemented automatic adding/removal of dom nodes based on changes in the data object of a node in my fork, see master...nielsboogaard:cytoscape-dom-node:master. Can be easily extended with add/removal upon node removal as well.

I can create a PR for it if you want @mwri

@mwri
Copy link
Owner

mwri commented Sep 1, 2023

Hi @nielsboogaard I think it would be great if you did a PR. Looking at your diff, shouldn't it listen to the remove event though to facilitate this?

@nielsboogaard
Copy link

Hi @nielsboogaard I think it would be great if you did a PR. Looking at your diff, shouldn't it listen to the remove event though to facilitate this?

Yes, that's what I said. Implemented it now upon changes in the data object, but can be extended with listening to remove as well. Will do and create a PR after that.

@bradley-edward
Copy link

Hi @nielsboogaard I think it would be great if you did a PR. Looking at your diff, shouldn't it listen to the remove event though to facilitate this?

Yes, that's what I said. Implemented it now upon changes in the data object, but can be extended with listening to remove as well. Will do and create a PR after that.

Hey. Did you managed to get the PR done and ready to submit?

@nielsboogaard
Copy link

Hi @nielsboogaard I think it would be great if you did a PR. Looking at your diff, shouldn't it listen to the remove event though to facilitate this?

Yes, that's what I said. Implemented it now upon changes in the data object, but can be extended with listening to remove as well. Will do and create a PR after that.

Hey. Did you managed to get the PR done and ready to submit?

Not yet, very busy lately and the coming weeks. Hopefully more time in some weeks.

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

4 participants