Merge branch 'main' into refactor/d3-drag
This commit is contained in:
+8
-2
@@ -45,9 +45,12 @@ export function createNodeInternals(nodes: Node[], nodeInternals: NodeInternals)
|
||||
|
||||
nodes.forEach((node) => {
|
||||
const z = isNumeric(node.zIndex) ? node.zIndex : node.dragging || node.selected ? 1000 : 0;
|
||||
const currInternals = nodeInternals.get(node.id);
|
||||
|
||||
const internals: Node = {
|
||||
...nodeInternals.get(node.id),
|
||||
width: currInternals?.width,
|
||||
height: currInternals?.height,
|
||||
handleBounds: currInternals?.handleBounds,
|
||||
...node,
|
||||
positionAbsolute: {
|
||||
x: node.position.x,
|
||||
@@ -148,7 +151,10 @@ export function createPositionChange({
|
||||
]
|
||||
: currentExtent;
|
||||
} else {
|
||||
console.warn('Only child nodes can use parent extent');
|
||||
// @ts-ignore
|
||||
if (process.env.NODE_ENV === 'development') {
|
||||
console.warn('[React Flow]: Only child nodes can use a parent extent. Help: https://reactflow.dev/error#500');
|
||||
}
|
||||
currentExtent = nodeExtent;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user