fixed, parentExpand & simplified updateNodePositions

This commit is contained in:
peterkogo
2024-01-24 13:44:28 +01:00
parent 5d3efa73a8
commit 829c82cfda
5 changed files with 9 additions and 15 deletions
+3 -6
View File
@@ -151,19 +151,16 @@ const createRFStore = ({
onNodesChange?.(changes);
}
},
updateNodePositions: (nodeDragItems, positionChanged = true, dragging = false) => {
updateNodePositions: (nodeDragItems, dragging = false) => {
const changes = nodeDragItems.map((node) => {
const change: NodePositionChange = {
id: node.id,
type: 'position',
position: node.position,
positionAbsolute: node.computed?.positionAbsolute,
dragging,
};
if (positionChanged) {
change.positionAbsolute = node.computed?.positionAbsolute;
change.position = node.position;
}
return change;
});