fix: Unify binding update options for updateBoundElements() (#8832)

Fix insonsistent naming for option newSize/oldSize for updateBoundElements()
This commit is contained in:
Márk Tolmács 2024-11-20 11:46:45 +01:00 committed by GitHub
parent 0927431d0d
commit 2db5bbcb29
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 17 additions and 22 deletions

View file

@ -739,9 +739,9 @@ export const resizeSingleElement = (
mutateElement(element, resizedElement);
updateBoundElements(element, elementsMap, {
oldSize: {
width: stateAtResizeStart.width,
height: stateAtResizeStart.height,
newSize: {
width: resizedElement.width,
height: resizedElement.height,
},
});
@ -999,14 +999,13 @@ export const resizeMultipleElements = (
element,
update: { boundTextFontSize, ...update },
} of elementsAndUpdates) {
const { angle } = update;
const { width: oldWidth, height: oldHeight } = element;
const { angle, width: newWidth, height: newHeight } = update;
mutateElement(element, update, false);
updateBoundElements(element, elementsMap, {
simultaneouslyUpdated: elementsToUpdate,
oldSize: { width: oldWidth, height: oldHeight },
newSize: { width: newWidth, height: newHeight },
});
const boundTextElement = getBoundTextElement(element, elementsMap);