Always elevate 1000 in zIndex when node is selected

Instead of only elevating when `zIndex` is unset
This commit is contained in:
Wenchen Li
2022-11-11 17:30:31 -05:00
committed by GitHub
parent fd00b18ebe
commit d586202d97
+1 -1
View File
@@ -39,7 +39,7 @@ export function createNodeInternals(nodes: Node[], nodeInternals: NodeInternals)
const parentNodes: ParentNodes = {};
nodes.forEach((node) => {
const z = isNumeric(node.zIndex) ? node.zIndex : node.selected ? 1000 : 0;
const z = (isNumeric(node.zIndex) ? node.zIndex : 0) + (node.selected ? 1000 : 0);
const currInternals = nodeInternals.get(node.id);
const internals: Node = {