This commit is contained in:
anovazzi1 2023-06-14 20:02:38 -03:00
commit 057a02c90c
2 changed files with 2 additions and 0 deletions

View file

@ -21,6 +21,7 @@ import {
downloadFlowsFromDatabase,
uploadFlowsToDatabase,
} from "../controllers/API";
import _ from "lodash";
const uid = new ShortUniqueId({ length: 5 });

View file

@ -127,6 +127,7 @@ export default function Page({ flow }: { flow: FlowType }) {
setEdges(flow?.data?.edges ?? []);
if (reactFlowInstance) {
setViewport(flow?.data?.viewport ?? { x: 1, y: 0, zoom: 0.5 });
reactFlowInstance.fitView();
}
}, [flow, reactFlowInstance, setEdges, setNodes, setViewport]);
//set extra sidebar