refactor(updates): only trigger dim updates when dim changed

This commit is contained in:
moklick
2024-04-11 12:31:14 +02:00
parent 63aa0dd713
commit 4fa3a87241
14 changed files with 57 additions and 53 deletions
@@ -123,7 +123,7 @@ export function NodeWrapper<NodeType extends Node>({
if (targetPosChanged) {
prevTargetPosition.current = node.targetPosition;
}
store.getState().updateNodeDimensions(new Map([[id, { id, nodeElement: nodeRef.current, force: true }]]));
store.getState().updateNodeInternals(new Map([[id, { id, nodeElement: nodeRef.current, force: true }]]));
}
}, [id, nodeType, node.sourcePosition, node.targetPosition]);