-
Hi there, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi @awaterho! The name of the To centre the camera on a Node, try using the simulation: {
onTick: () => {
graph.zoomToNodeById(nodeIdToCenter, 0, graph.getZoomLevel())
}
} Please check the example on Codesandbox with a demonstration. Let as know if you need any more help. |
Beta Was this translation helpful? Give feedback.
Hi @awaterho!
The name of the
trackNodesByIds
method sounds a bit confusing, it has nothing to do with centring the camera on a Node. We've renamed it totrackNodePositionsByIds
for clarity.To centre the camera on a Node, try using the
zoomToNodeById
method together with theonTick
callback:Please check the example on Codesandbox with a demonstration. Let as know if you need any more help.