vasturiano / react-force-graph

React component for 2D, 3D, VR and AR force directed graphs
https://vasturiano.github.io/react-force-graph/example/large-graph/
MIT License
2.17k stars 279 forks source link

How to zoom in and out properly when entering and exiting full screen mode? #535

Open W-HanYu opened 1 week ago

W-HanYu commented 1 week ago

Why can't zoomTofit api be used in react-force-grapg-2d?

vasturiano commented 6 days ago

@vasturiano thanks for reaching out.

zoomToFit is a component method for react-force-graph-2d. In fact, you can see it working in this example: https://github.com/vasturiano/react-force-graph/blob/master/example/fit-to-canvas/index.html

If you're having some trouble getting it to work, please provide a simple example on https://codesandbox.io/.