Replies: 1 comment 2 replies
-
I am having the same issue! |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I'm currently using ReactFlow V10 and getting the instance using
const flowInstance = useReactFlow();
I have been using some of the instance functions like
getNodes
,getEdges
,project
successfully so far and I would now like to use functions that will change the graph in some way (getViewport
,setViewport
,zoomIn
) but none of these are working.setViewport
andzoomIn
/zoomOut
does nothing whilegetViewport
always returns the same things ({ x: 0, y: 0, zoom: 1 }
) no matter how much I move / zoom.It really looks like the viewport of the instance is not really connected to the viewport of the graph because everything is working except functions that will interact with the viewport.
Does someone have any idea what could cause viewport related functions of reactflow instance to not work ?
Thanks for the help.
Beta Was this translation helpful? Give feedback.
All reactions