How to center a BPMN diagram in a viewer created using Navigated Viewer?

Hello, I want the BPMN diagram to be in the middle of the viewer created by Navigated Viewer, but I haven’t found the relevant method. Can you give me some help? Thank you very much.

just use this code part, it worked for me. :upside_down_face:

canvas.zoom(‘fit-viewport’, ‘auto’);