Skip to content

Commit f540109

Browse files
committed
set z-index to export
1 parent 6dee0c7 commit f540109

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

packages/learningmap/src/editorStore.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,8 @@ export const useEditorStore = create<EditorState>()(
372372
draggable: true,
373373
className: n.data.color ? n.data.color : n.className,
374374
// Ensure zIndex is set based on node type if not already present
375-
zIndex: n.zIndex !== undefined ? n.zIndex : getZIndexForNodeType(n.type),
375+
zIndex:
376+
n.zIndex !== undefined ? n.zIndex : getZIndexForNodeType(n.type),
376377
data: { ...n.data },
377378
}));
378379

@@ -406,7 +407,10 @@ export const useEditorStore = create<EditorState>()(
406407
position: n.position,
407408
width: n.width,
408409
height: n.height,
409-
zIndex: n.zIndex,
410+
zIndex:
411+
n.zIndex !== undefined
412+
? n.zIndex
413+
: getZIndexForNodeType(n.type),
410414
data: n.data,
411415
})),
412416
edges: state.edges

0 commit comments

Comments
 (0)