How move canvas to selected item?

I have the following code that puts focus on a canvas element, I would like to achieve a behavior where not only the focus is set to the appropriate element, but the camera(canvas) is moved to the selected element

const selectedTask = bpmnViewerRef.current.get('elementRegistry').get('Activity_1ycb51d')
        bpmnViewerRef.current.get('canvas').zoom(1.0, selectedTask)

duplication: Zoom to a specific element

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.