chore(useReactFlow): cleanup

This commit is contained in:
moklick
2024-04-17 13:50:52 +02:00
parent 6bab47fcb7
commit 12c081a62e
2 changed files with 4 additions and 6 deletions
+3 -2
View File
@@ -183,8 +183,9 @@ export function handleExpandParent(
const dimensions = getNodeDimensions(parent);
// determine how much the parent expands by moving the position
let xChange = expandedRect.x < position.x ? Math.round(Math.abs(position.x - expandedRect.x)) : 0;
let yChange = expandedRect.y < position.y ? Math.round(Math.abs(position.y - expandedRect.y)) : 0;
const xChange = expandedRect.x < position.x ? Math.round(Math.abs(position.x - expandedRect.x)) : 0;
const yChange = expandedRect.y < position.y ? Math.round(Math.abs(position.y - expandedRect.y)) : 0;
if (xChange > 0 || yChange > 0) {
changes.push({
id: parentId,