netjsongraph.js icon indicating copy to clipboard operation
netjsongraph.js copied to clipboard

[bug] Clustering zoom/center changes inconsistently

Open nemesifier opened this issue 2 months ago • 1 comments

Here: https://openwisp.github.io/netjsongraph.js/examples/netjson-clustering.html It seems to me that if I click on a node which is part of a cluster (after zooming in a bit) the zoom level changes.

In the following recordings, clicking on single nodes, some times changes the zoom level and center of the map some times doesn't:

Image

This behavior looks inconsistent to me.

I believe we should zoom in only when clicking on a cluster, when clicking on a single node we shouldn't do it.

nemesifier avatar Oct 15 '25 19:10 nemesifier

@nemesifier Sorry to say, but I checked the link and tried to click on every node but I never faced this issue that you mentioned. I have tried clicking the clusters and going deeper but the thing is working perfectly to my knowledge and use case. I am on Brave Browser for your kind information.

https://youtu.be/jX2NxByPAkg here is the video if you want to check.

DarkMellow avatar Nov 12 '25 12:11 DarkMellow

@nemesifier i have work on this kind of project and i am surely say that i will be fix it can you assign this issue to me

Abhinandankaushik avatar Dec 12 '25 19:12 Abhinandankaushik

Hi, I checked the clustering example, and I can reproduce this behavior — clicking on single nodes sometimes changes the zoom level and map center. I’d like to work on this issue. My plan would be to ensure that zoom adjustments happen only when a cluster (not an individual node) is clicked. When a single node is clicked, the view should remain stable and not trigger any zoom or center changes.

Please let me know if this approach sounds good before I start working on it.

Ayushhrajput avatar Dec 16 '25 15:12 Ayushhrajput