From 99a322cfa2e86b9fc8fc4edbdcf6892ae6715f5b Mon Sep 17 00:00:00 2001 From: Steve Ruiz Date: Mon, 8 Apr 2024 14:47:18 +0100 Subject: [PATCH] ok --- .../src/lib/tools/SelectTool/childStates/Resizing.ts | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/packages/tldraw/src/lib/tools/SelectTool/childStates/Resizing.ts b/packages/tldraw/src/lib/tools/SelectTool/childStates/Resizing.ts index 08f9db343..1fd72dd47 100644 --- a/packages/tldraw/src/lib/tools/SelectTool/childStates/Resizing.ts +++ b/packages/tldraw/src/lib/tools/SelectTool/childStates/Resizing.ts @@ -335,14 +335,12 @@ export class Resizing extends StateNode { }) } - const partials: TLShapePartial[] = Array(shapeSnapshots.size) - for (const [_, snapshot] of shapeSnapshots) { // We need to update the store one by one, so that children pick up // the page transform of their resized parents. But should they? // We update frames again later... - partials.push( + this.updateShapesInStore([ getResizedShapePartial(this.editor, snapshot.shape.id, scale, { initialShape: snapshot.shape, initialBounds: snapshot.bounds, @@ -354,12 +352,10 @@ export class Resizing extends StateNode { : 'scale_shape', scaleOrigin: scaleOriginPage, scaleAxisRotation: selectionRotation, - }) - ) + }), + ]) } - this.updateShapesInStore(partials) - if (this.editor.inputs.ctrlKey) { // If the user is holding ctrl, then preseve the initial position // of the frame's children relative to the frame's top left corner