State changes reverts graph back to initialZoom
jadenmazzone opened this issue · 2 comments
jadenmazzone commented
Describe the bug
If intialZoom is not null in the config, and there is a state change to the react application then the graph will be reverted back to the initialZoom.
To Reproduce
Steps to reproduce the behavior:
- set initialZoom: 0.1
- have state change (can be anything), but for this purpose, "setDoesNothing(false) when node is clicked"
Expected behavior
Expected that the initialZoom is only "initial" and that any state changes should not revert the graph to it's initialZoom
Environment:
- using hooks
- react-d3-graph version 2.6.0
Additional context
Add any other context about the problem here.
aoshi321 commented
Hi Im experiencing the same thing. Is there a way to resolve this. @jadenmazzone Did you mange to get this to work?
jadenmazzone commented
@aoshi321 Just a hacky way... setting the config with initialZoom back to null if I make any state changes.