Closed dhess closed 1 year ago
Recording a comment that @brprice had written in a corresponding Linear issue (now deleted):
I just tested using Firefox's native
scrollIntoView
, which does not work right (it scrolls the browser viewport, rather than panning the reactflow component). However, it seems that there are reactflow APIs to programmatically pan. See https://reactflow.dev/docs/api/react-flow-instance/#viewport, and an example at https://reactflow.dev/docs/examples/misc/use-react-flow-hook/
This was fixed in #927
When the student selects a definition, either in the definition list, or on the canvas, the canvas should automatically scroll such that the definition is centered in the viewport.