We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6dee0c7 commit f540109Copy full SHA for f540109
1 file changed
packages/learningmap/src/editorStore.ts
@@ -372,7 +372,8 @@ export const useEditorStore = create<EditorState>()(
372
draggable: true,
373
className: n.data.color ? n.data.color : n.className,
374
// Ensure zIndex is set based on node type if not already present
375
- zIndex: n.zIndex !== undefined ? n.zIndex : getZIndexForNodeType(n.type),
+ zIndex:
376
+ n.zIndex !== undefined ? n.zIndex : getZIndexForNodeType(n.type),
377
data: { ...n.data },
378
}));
379
@@ -406,7 +407,10 @@ export const useEditorStore = create<EditorState>()(
406
407
position: n.position,
408
width: n.width,
409
height: n.height,
- zIndex: n.zIndex,
410
411
+ n.zIndex !== undefined
412
+ ? n.zIndex
413
+ : getZIndexForNodeType(n.type),
414
data: n.data,
415
})),
416
edges: state.edges
0 commit comments