Merge pull request #5321 from dylanmiddendorf/bug-fix-node-positions

Fix bug where non-child node positions aren't clamped
This commit is contained in:
Moritz Klack
2025-07-11 09:40:43 +02:00
committed by GitHub
2 changed files with 6 additions and 1 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@xyflow/system': patch
---
Fix incorrect node position clamping for non-child nodes
+1 -1
View File
@@ -413,7 +413,7 @@ export function calculateNodePosition<NodeType extends NodeBase>({
const { x: parentX, y: parentY } = parentNode ? parentNode.internals.positionAbsolute : { x: 0, y: 0 };
const origin = node.origin ?? nodeOrigin;
let extent = nodeExtent;
let extent = node.extent || nodeExtent;
if (node.extent === 'parent' && !node.expandParent) {
if (!parentNode) {