mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
fix: Unify binding update options for updateBoundElements()
(#8832)
Fix insonsistent naming for option newSize/oldSize for updateBoundElements()
This commit is contained in:
parent
0927431d0d
commit
2db5bbcb29
8 changed files with 17 additions and 22 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue