refactor(react): use node.width/height for resizer changes

This commit is contained in:
moklick
2024-01-09 16:20:47 +01:00
parent 8487cb10e0
commit b18ef10e43
4 changed files with 7 additions and 7 deletions
+5 -3
View File
@@ -121,10 +121,12 @@ function applyChanges(changes: any[], elements: any[]): any[] {
}
updateItem.computed.width = currentChange.dimensions.width;
updateItem.computed.height = currentChange.dimensions.height;
}
if (typeof currentChange.updateStyle !== 'undefined') {
updateItem.style = { ...(updateItem.style || {}), ...currentChange.dimensions };
// this is needed for the node resizer to work
if (currentChange.resizing) {
updateItem.width = currentChange.dimensions.width;
updateItem.height = currentChange.dimensions.height;
}
}
if (typeof currentChange.resizing === 'boolean') {