diff --git a/spiffworkflow-frontend/src/components/ReactDiagramEditor.tsx b/spiffworkflow-frontend/src/components/ReactDiagramEditor.tsx index e3989c63..eefaff82 100644 --- a/spiffworkflow-frontend/src/components/ReactDiagramEditor.tsx +++ b/spiffworkflow-frontend/src/components/ReactDiagramEditor.tsx @@ -450,7 +450,10 @@ export default function ReactDiagramEditor({ if (alreadyImportedXmlRef.current) { return; } - diagramModelerToUse.importXML(diagramXMLToDisplay); + diagramModelerToUse.importXML(diagramXMLToDisplay).then(() => { + diagramModelerToUse.get('canvas').zoom('fit-viewport'); + }); + alreadyImportedXmlRef.current = true; }