dash14 / v-network-graph

An interactive network graph visualization component for Vue 3
https://dash14.github.io/v-network-graph/
MIT License
495 stars 44 forks source link

Minimum zoom level isn't working properly #14

Closed markus-ebner closed 2 years ago

markus-ebner commented 2 years ago

Hi @dash14, I don't know if I configure something wrongly, but I can't set the minimum zoom level. That's my config regarding zoom:

zoomEnabled: true, // whether the zoom is enabled or not.     default: true
minZoomLevel: 0.5, // minimum zoom level.                     default: 0.1
maxZoomLevel: 2, // maximum zoom level.                     default: 64

You can also see in one of your examples (https://dash14.github.io/v-network-graph/examples/layout.html#scale-the-entire-objects) that you can scroll out indefinitely. Is that desired?

Sorry for beeing this much annoying 😅 Best regards

dash14 commented 2 years ago

Hi @markus-ebner, Thank you for detecting so many issues. I appreciate it very much! This was also a bug... I'm sorry for the inconvenience. I just fixed it: v0.3.6

You can also see in one of your examples (https://dash14.github.io/v-network-graph/examples/layout.html#scale-the-entire-objects) that you can scroll out indefinitely. Is that desired?

I hadn't bothered with the zoom level, but as you pointed out, it was unnatural. I changed it to limit it to the range that can be specified with the slider. Please continue to let me know if you notice any problems.

Best regards

markus-ebner commented 2 years ago

Hi @dash14,

thanks, it works now :)