refactor(node-internals): only keep width, height and handleBounds
This commit is contained in:
+4
-1
@@ -43,9 +43,12 @@ export function createNodeInternals(nodes: Node[], nodeInternals: NodeInternals)
|
|||||||
|
|
||||||
nodes.forEach((node) => {
|
nodes.forEach((node) => {
|
||||||
const z = isNumeric(node.zIndex) ? node.zIndex : node.dragging || node.selected ? 1000 : 0;
|
const z = isNumeric(node.zIndex) ? node.zIndex : node.dragging || node.selected ? 1000 : 0;
|
||||||
|
const currInternals = nodeInternals.get(node.id);
|
||||||
|
|
||||||
const internals: Node = {
|
const internals: Node = {
|
||||||
...nodeInternals.get(node.id),
|
width: currInternals?.width,
|
||||||
|
height: currInternals?.height,
|
||||||
|
handleBounds: currInternals?.handleBounds,
|
||||||
...node,
|
...node,
|
||||||
positionAbsolute: {
|
positionAbsolute: {
|
||||||
x: node.position.x,
|
x: node.position.x,
|
||||||
|
|||||||
Reference in New Issue
Block a user