Skip to content
This repository has been archived by the owner on Jul 29, 2019. It is now read-only.

Empty cluster nodes not being removed #3368

Closed
sawatts opened this issue Aug 17, 2017 · 4 comments
Closed

Empty cluster nodes not being removed #3368

sawatts opened this issue Aug 17, 2017 · 4 comments

Comments

@sawatts
Copy link

sawatts commented Aug 17, 2017

Not sure what the intended behaviour is here, but if I have a cluster whose child nodes are removed (externally from the DataSet), those objects remain in the network and there does not appear to be a mechanism to reach them programmatically.

Example: jbin

The use case is: A network which is populated and updated from an external feed, while clustering is available to the user to manage their view.

My expected behaviour would be to replace a cluster of one node byt its child, and remove a cluster with no children. This issue is compounded by empty clusters not being handled well by the core code, and the lack of any means to iterate cluster nodes in the network.

Workaround may be to cache cluster nodes options and/or ids in processProperties to make them accessible to the client code. However this adds a management overhead which duplicates what should be being done within the network.

@wimrijnders
Copy link
Contributor

This is a known issue and one I'm very well aware of. Dynamic data update and clustering simply don't play nice together. The changes required for these have been put in motion with #3330, but as I noted in that PR:

While this fixes the issues mentioned, the dynamic update of clustering is not complete. I added TODO's at the top of Clustering.js to record these.

The current PR is big enough already and is enough to fix the mentioned issues, so these TODO's will be addressed in a separate PR.

I'm actually happy that you reported this, it means that there are more people out there running into this issue, so I can feel justified in handling it with a higher priority.

I'll use current Issue as the leading one for these changes.

@wimrijnders
Copy link
Contributor

Hereby informing you that I'm working on it right now.

@sawatts
Copy link
Author

sawatts commented Aug 29, 2017

Thanks for the very prompt effort in this and the other issues I have raised since starting work with vis.js. Its is very much appreciated.

@wimrijnders
Copy link
Contributor

Thanks! Appreciation is the currency for open-source maintenance.

I did give this particular issue precedence because I thought it was important. But for this issue, many others have been neglected.....I gave up keeping up 😖.

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

No branches or pull requests

3 participants