refactor(react/internal-nodes): cleanup

This commit is contained in:
moklick
2024-04-03 12:54:55 +02:00
parent 6753c19188
commit f45f50671d
2 changed files with 31 additions and 22 deletions
+12 -2
View File
@@ -136,8 +136,18 @@ const createRFStore = ({
dragging,
};
if (internalNode?.expandParent) {
triggerChangeNodes.push(internalNode);
if (internalNode?.expandParent && change.position) {
triggerChangeNodes.push({
...internalNode,
position: change.position,
internals: {
...internalNode.internals,
positionAbsolute: node.internals.positionAbsolute,
},
});
change.position.x = Math.max(0, change.position.x);
change.position.y = Math.max(0, change.position.y);
}
return change;