use object instead of array for paddings & clean up fitView code

This commit is contained in:
peterkogo
2025-03-26 12:49:43 +01:00
parent e3ecf999aa
commit 48d0837939
3 changed files with 99 additions and 82 deletions
+1 -2
View File
@@ -147,8 +147,7 @@ const BasicFlow = () => {
maxZoom={4}
fitView
fitViewOptions={{
// top, right, bottom, left
padding: ['100px', '0%', '0%', '50px'],
padding: { top: '100px', left: '0%', right: '10%', bottom: 0.1 },
}}
defaultEdgeOptions={defaultEdgeOptions}
selectNodesOnDrag={false}