danielcaldas/react-d3-graph

State changes reverts graph back to initialZoom

jadenmazzone opened this issue · 2 comments

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:

  1. set initialZoom: 0.1
  2. 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.

Hi Im experiencing the same thing. Is there a way to resolve this. @jadenmazzone Did you mange to get this to work?

@aoshi321 Just a hacky way... setting the config with initialZoom back to null if I make any state changes.