Merge branch 'main' into refactor/d3-drag

This commit is contained in:
moklick
2022-05-08 18:57:52 +02:00
39 changed files with 7275 additions and 8383 deletions
+8 -2
View File
@@ -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;
}
}