The zoom in/out function stops working once AutoZoom is selected with large graph data
See original GitHub issueI’m submitting a … (check one with “x”)
[X] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here
Current behavior
If we auto-zoom on a graph with large data then zoom stops working. One is not able to zoom in/out once auto-zoom is selected.
Expected behavior
Zoom in/out should work fine even after selecting auto-zoom with large graph.
Reproduction of the problem
I could reproduce this problem on demo page as well : https://swimlane.github.io/ngx-graph/ Perform following steps
- select real data
- wait for two minutes (approx) to populate some good amount of data so that screen fills with nodes.
- select auto-zoom (the graph will fit to the screen) or select ‘FIT IN VIEW’
- try to zoom in/out
Possibly it happens when zoom level goes below 0.1 Because we could not zoom in below level of 0.1 when using manual zoom through mousewheel.
Kindly let me know if you want elaboration.
What is the motivation / use case for changing the behavior?
Please tell us about your environment:
NPM = 6.x
- ngx-graph version: x.x.x
ngx-graph version = 5.2.1
- Angular version: x.x.x
Angular = 7.x (I could reproduce it with 6.x)
- Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]
all
- Language: [all | TypeScript X.X | ES6/7 | ES5] all
Issue Analytics
- State:
- Created 5 years ago
- Comments:11 (6 by maintainers)

Top Related StackOverflow Question
That’s our goal.
After more than 2-3 minutes, I succeeded to reproduce it. We will keep this issue open.
The required change IMO is to add validation of zoom level between 0.1 - 4 in the graph component.
Thanks @rahul-winner