From 61bb357f8a02a26a4ef7116e812f2a3d69069e51 Mon Sep 17 00:00:00 2001 From: dwelle <5153846+dwelle@users.noreply.github.com> Date: Fri, 10 Apr 2026 13:36:15 +0200 Subject: [PATCH] fix group action regression --- packages/excalidraw/actions/actionGroup.tsx | 15 ++++- .../__snapshots__/contextmenu.test.tsx.snap | 17 +++++ .../tests/__snapshots__/history.test.tsx.snap | 63 +++++++++++++++++++ .../regressionTests.test.tsx.snap | 52 +++++++++++++++ .../tests/__snapshots__/export.test.ts.snap | 1 + 5 files changed, 145 insertions(+), 3 deletions(-) diff --git a/packages/excalidraw/actions/actionGroup.tsx b/packages/excalidraw/actions/actionGroup.tsx index c72216b761..76bc447a24 100644 --- a/packages/excalidraw/actions/actionGroup.tsx +++ b/packages/excalidraw/actions/actionGroup.tsx @@ -49,9 +49,18 @@ import { register } from "./register"; import type { AppClassProperties, AppState } from "../types"; -const allElementsInSameGroup = (elements: readonly ExcalidrawElement[]) => { +const allElementsInSameGroup = ( + elements: readonly ExcalidrawElement[], + editingGroupId: AppState["editingGroupId"], +) => { if (elements.length >= 2) { - const groupIds = elements[0].groupIds; + const editingGroupIndex = editingGroupId + ? elements[0].groupIds.indexOf(editingGroupId) + : -1; + const groupIds = + editingGroupIndex > -1 + ? elements[0].groupIds.slice(0, editingGroupIndex) + : elements[0].groupIds; for (const groupId of groupIds) { if ( elements.reduce( @@ -78,7 +87,7 @@ const enableActionGroup = ( return ( selectedElements.length >= 2 && - !allElementsInSameGroup(selectedElements) && + !allElementsInSameGroup(selectedElements, appState.editingGroupId) && !frameAndChildrenSelectedTogether(selectedElements) ); }; diff --git a/packages/excalidraw/tests/__snapshots__/contextmenu.test.tsx.snap b/packages/excalidraw/tests/__snapshots__/contextmenu.test.tsx.snap index cb548f5b62..00b6dbdddc 100644 --- a/packages/excalidraw/tests/__snapshots__/contextmenu.test.tsx.snap +++ b/packages/excalidraw/tests/__snapshots__/contextmenu.test.tsx.snap @@ -961,6 +961,7 @@ exports[`contextMenu element > right-clicking on a group should select whole gro }, "previousSelectedElementIds": {}, "resizingElement": null, + "scrollConstraints": null, "scrollX": 0, "scrollY": 0, "scrolledOutside": false, @@ -1158,6 +1159,7 @@ exports[`contextMenu element > selecting 'Add to library' in context menu adds e }, "previousSelectedElementIds": {}, "resizingElement": null, + "scrollConstraints": null, "scrollX": 0, "scrollY": 0, "scrolledOutside": true, @@ -1373,6 +1375,7 @@ exports[`contextMenu element > selecting 'Bring forward' in context menu brings }, "previousSelectedElementIds": {}, "resizingElement": null, + "scrollConstraints": null, "scrollX": 0, "scrollY": 0, "scrolledOutside": false, @@ -1705,6 +1708,7 @@ exports[`contextMenu element > selecting 'Bring to front' in context menu brings }, "previousSelectedElementIds": {}, "resizingElement": null, + "scrollConstraints": null, "scrollX": 0, "scrollY": 0, "scrolledOutside": false, @@ -2037,6 +2041,7 @@ exports[`contextMenu element > selecting 'Copy styles' in context menu copies st }, "previousSelectedElementIds": {}, "resizingElement": null, + "scrollConstraints": null, "scrollX": 0, "scrollY": 0, "scrolledOutside": true, @@ -2252,6 +2257,7 @@ exports[`contextMenu element > selecting 'Delete' in context menu deletes elemen }, "previousSelectedElementIds": {}, "resizingElement": null, + "scrollConstraints": null, "scrollX": 0, "scrollY": 0, "scrolledOutside": false, @@ -2494,6 +2500,7 @@ exports[`contextMenu element > selecting 'Duplicate' in context menu duplicates }, "previousSelectedElementIds": {}, "resizingElement": null, + "scrollConstraints": null, "scrollX": 0, "scrollY": 0, "scrolledOutside": false, @@ -2795,6 +2802,7 @@ exports[`contextMenu element > selecting 'Group selection' in context menu group "id3": true, }, "resizingElement": null, + "scrollConstraints": null, "scrollX": 0, "scrollY": 0, "scrolledOutside": false, @@ -3166,6 +3174,7 @@ exports[`contextMenu element > selecting 'Paste styles' in context menu pastes s }, "previousSelectedElementIds": {}, "resizingElement": null, + "scrollConstraints": null, "scrollX": 0, "scrollY": 0, "scrolledOutside": false, @@ -3660,6 +3669,7 @@ exports[`contextMenu element > selecting 'Send backward' in context menu sends e }, "previousSelectedElementIds": {}, "resizingElement": null, + "scrollConstraints": null, "scrollX": 0, "scrollY": 0, "scrolledOutside": false, @@ -3984,6 +3994,7 @@ exports[`contextMenu element > selecting 'Send to back' in context menu sends el }, "previousSelectedElementIds": {}, "resizingElement": null, + "scrollConstraints": null, "scrollX": 0, "scrollY": 0, "scrolledOutside": false, @@ -4310,6 +4321,7 @@ exports[`contextMenu element > selecting 'Ungroup selection' in context menu ung "id3": true, }, "resizingElement": null, + "scrollConstraints": null, "scrollX": 0, "scrollY": 0, "scrolledOutside": false, @@ -5596,6 +5608,7 @@ exports[`contextMenu element > shows 'Group selection' in context menu for multi "id0": true, }, "resizingElement": null, + "scrollConstraints": null, "scrollX": 0, "scrollY": 0, "scrolledOutside": false, @@ -6814,6 +6827,7 @@ exports[`contextMenu element > shows 'Ungroup selection' in context menu for gro "id0": true, }, "resizingElement": null, + "scrollConstraints": null, "scrollX": 0, "scrollY": 0, "scrolledOutside": false, @@ -7773,6 +7787,7 @@ exports[`contextMenu element > shows context menu for canvas > [end of test] app }, "previousSelectedElementIds": {}, "resizingElement": null, + "scrollConstraints": null, "scrollX": 0, "scrollY": 0, "scrolledOutside": false, @@ -8771,6 +8786,7 @@ exports[`contextMenu element > shows context menu for element > [end of test] ap }, "previousSelectedElementIds": {}, "resizingElement": null, + "scrollConstraints": null, "scrollX": 0, "scrollY": 0, "scrolledOutside": true, @@ -9766,6 +9782,7 @@ exports[`contextMenu element > shows context menu for element > [end of test] ap }, "previousSelectedElementIds": {}, "resizingElement": null, + "scrollConstraints": null, "scrollX": 0, "scrollY": 0, "scrolledOutside": false, diff --git a/packages/excalidraw/tests/__snapshots__/history.test.tsx.snap b/packages/excalidraw/tests/__snapshots__/history.test.tsx.snap index 2923e9b321..9c5a891477 100644 --- a/packages/excalidraw/tests/__snapshots__/history.test.tsx.snap +++ b/packages/excalidraw/tests/__snapshots__/history.test.tsx.snap @@ -85,6 +85,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl "id4": true, }, "resizingElement": null, + "scrollConstraints": null, "scrollX": 0, "scrollY": 0, "searchMatches": null, @@ -719,6 +720,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl "id4": true, }, "resizingElement": null, + "scrollConstraints": null, "scrollX": 0, "scrollY": 0, "searchMatches": null, @@ -1282,6 +1284,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl }, "previousSelectedElementIds": {}, "resizingElement": null, + "scrollConstraints": null, "scrollX": 0, "scrollY": 0, "searchMatches": null, @@ -1643,6 +1646,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl }, "previousSelectedElementIds": {}, "resizingElement": null, + "scrollConstraints": null, "scrollX": 0, "scrollY": 0, "searchMatches": null, @@ -2006,6 +2010,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl }, "previousSelectedElementIds": {}, "resizingElement": null, + "scrollConstraints": null, "scrollX": 0, "scrollY": 0, "searchMatches": null, @@ -2267,6 +2272,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl }, "previousSelectedElementIds": {}, "resizingElement": null, + "scrollConstraints": null, "scrollX": 0, "scrollY": 0, "searchMatches": null, @@ -2724,6 +2730,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and }, "previousSelectedElementIds": {}, "resizingElement": null, + "scrollConstraints": null, "scrollX": 0, "scrollY": 0, "searchMatches": null, @@ -3028,6 +3035,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and }, "previousSelectedElementIds": {}, "resizingElement": null, + "scrollConstraints": null, "scrollX": 0, "scrollY": 0, "searchMatches": null, @@ -3348,6 +3356,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and }, "previousSelectedElementIds": {}, "resizingElement": null, + "scrollConstraints": null, "scrollX": 0, "scrollY": 0, "searchMatches": null, @@ -3643,6 +3652,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and }, "previousSelectedElementIds": {}, "resizingElement": null, + "scrollConstraints": null, "scrollX": 0, "scrollY": 0, "searchMatches": null, @@ -3930,6 +3940,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and }, "previousSelectedElementIds": {}, "resizingElement": null, + "scrollConstraints": null, "scrollX": 0, "scrollY": 0, "searchMatches": null, @@ -4166,6 +4177,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and }, "previousSelectedElementIds": {}, "resizingElement": null, + "scrollConstraints": null, "scrollX": 0, "scrollY": 0, "searchMatches": null, @@ -4424,6 +4436,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and }, "previousSelectedElementIds": {}, "resizingElement": null, + "scrollConstraints": null, "scrollX": 0, "scrollY": 0, "searchMatches": null, @@ -4696,6 +4709,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and }, "previousSelectedElementIds": {}, "resizingElement": null, + "scrollConstraints": null, "scrollX": 0, "scrollY": 0, "searchMatches": null, @@ -4926,6 +4940,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and }, "previousSelectedElementIds": {}, "resizingElement": null, + "scrollConstraints": null, "scrollX": 0, "scrollY": 0, "searchMatches": null, @@ -5156,6 +5171,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and }, "previousSelectedElementIds": {}, "resizingElement": null, + "scrollConstraints": null, "scrollX": 0, "scrollY": 0, "searchMatches": null, @@ -5404,6 +5420,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and }, "previousSelectedElementIds": {}, "resizingElement": null, + "scrollConstraints": null, "scrollX": 0, "scrollY": 0, "searchMatches": null, @@ -5661,6 +5678,7 @@ exports[`history > multiplayer undo/redo > conflicts in frames and their childre }, "previousSelectedElementIds": {}, "resizingElement": null, + "scrollConstraints": null, "scrollX": 0, "scrollY": 0, "searchMatches": null, @@ -5919,6 +5937,7 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh "id1": true, }, "resizingElement": null, + "scrollConstraints": null, "scrollX": 0, "scrollY": 0, "searchMatches": null, @@ -6249,6 +6268,7 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh "id8": true, }, "resizingElement": null, + "scrollConstraints": null, "scrollX": 0, "scrollY": 0, "searchMatches": null, @@ -6677,6 +6697,7 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh "id1": true, }, "resizingElement": null, + "scrollConstraints": null, "scrollX": 0, "scrollY": 0, "searchMatches": null, @@ -7053,6 +7074,7 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh }, "previousSelectedElementIds": {}, "resizingElement": null, + "scrollConstraints": null, "scrollX": 0, "scrollY": 0, "searchMatches": null, @@ -7363,6 +7385,7 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh }, "previousSelectedElementIds": {}, "resizingElement": null, + "scrollConstraints": null, "scrollX": 0, "scrollY": 0, "searchMatches": null, @@ -7656,6 +7679,7 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh }, "previousSelectedElementIds": {}, "resizingElement": null, + "scrollConstraints": null, "scrollX": 0, "scrollY": 0, "searchMatches": null, @@ -7887,6 +7911,7 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh }, "previousSelectedElementIds": {}, "resizingElement": null, + "scrollConstraints": null, "scrollX": 0, "scrollY": 0, "searchMatches": null, @@ -8240,6 +8265,7 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh }, "previousSelectedElementIds": {}, "resizingElement": null, + "scrollConstraints": null, "scrollX": 0, "scrollY": 0, "searchMatches": null, @@ -8596,6 +8622,7 @@ exports[`history > multiplayer undo/redo > should not let remote changes to inte "id3": true, }, "resizingElement": null, + "scrollConstraints": null, "scrollX": 0, "scrollY": 0, "searchMatches": null, @@ -9000,6 +9027,7 @@ exports[`history > multiplayer undo/redo > should not let remote changes to inte }, "previousSelectedElementIds": {}, "resizingElement": null, + "scrollConstraints": null, "scrollX": 0, "scrollY": 0, "searchMatches": null, @@ -9280,6 +9308,7 @@ exports[`history > multiplayer undo/redo > should not let remote changes to inte }, "previousSelectedElementIds": {}, "resizingElement": null, + "scrollConstraints": null, "scrollX": 0, "scrollY": 0, "searchMatches": null, @@ -9545,6 +9574,7 @@ exports[`history > multiplayer undo/redo > should not override remote changes on }, "previousSelectedElementIds": {}, "resizingElement": null, + "scrollConstraints": null, "scrollX": 0, "scrollY": 0, "searchMatches": null, @@ -9811,6 +9841,7 @@ exports[`history > multiplayer undo/redo > should not override remote changes on }, "previousSelectedElementIds": {}, "resizingElement": null, + "scrollConstraints": null, "scrollX": 0, "scrollY": 0, "searchMatches": null, @@ -10047,6 +10078,7 @@ exports[`history > multiplayer undo/redo > should override remotely added groups }, "previousSelectedElementIds": {}, "resizingElement": null, + "scrollConstraints": null, "scrollX": 0, "scrollY": 0, "searchMatches": null, @@ -10342,6 +10374,7 @@ exports[`history > multiplayer undo/redo > should override remotely added points }, "previousSelectedElementIds": {}, "resizingElement": null, + "scrollConstraints": null, "scrollX": 0, "scrollY": 0, "searchMatches": null, @@ -10660,6 +10693,7 @@ exports[`history > multiplayer undo/redo > should redistribute deltas when eleme }, "previousSelectedElementIds": {}, "resizingElement": null, + "scrollConstraints": null, "scrollX": 0, "scrollY": 0, "searchMatches": null, @@ -10900,6 +10934,7 @@ exports[`history > multiplayer undo/redo > should redraw arrows on undo > [end o }, "previousSelectedElementIds": {}, "resizingElement": null, + "scrollConstraints": null, "scrollX": 0, "scrollY": 0, "searchMatches": null, @@ -11823,6 +11858,7 @@ exports[`history > multiplayer undo/redo > should update history entries after r }, "previousSelectedElementIds": {}, "resizingElement": null, + "scrollConstraints": null, "scrollX": 0, "scrollY": 0, "searchMatches": null, @@ -12084,6 +12120,7 @@ exports[`history > singleplayer undo/redo > remounting undo/redo buttons should }, "previousSelectedElementIds": {}, "resizingElement": null, + "scrollConstraints": null, "scrollX": 0, "scrollY": 0, "searchMatches": null, @@ -12320,6 +12357,7 @@ exports[`history > singleplayer undo/redo > should clear the redo stack on eleme }, "previousSelectedElementIds": {}, "resizingElement": null, + "scrollConstraints": null, "scrollX": 0, "scrollY": 0, "searchMatches": null, @@ -12558,6 +12596,7 @@ exports[`history > singleplayer undo/redo > should create entry when selecting f }, "previousSelectedElementIds": {}, "resizingElement": null, + "scrollConstraints": null, "scrollX": 0, "scrollY": 0, "searchMatches": null, @@ -12953,6 +12992,7 @@ exports[`history > singleplayer undo/redo > should create new history entry on e }, "previousSelectedElementIds": {}, "resizingElement": null, + "scrollConstraints": null, "scrollX": 0, "scrollY": 0, "searchMatches": null, @@ -13161,6 +13201,7 @@ exports[`history > singleplayer undo/redo > should create new history entry on e }, "previousSelectedElementIds": {}, "resizingElement": null, + "scrollConstraints": null, "scrollX": 0, "scrollY": 0, "searchMatches": null, @@ -13372,6 +13413,7 @@ exports[`history > singleplayer undo/redo > should create new history entry on i }, "previousSelectedElementIds": {}, "resizingElement": null, + "scrollConstraints": null, "scrollX": 0, "scrollY": 0, "searchMatches": null, @@ -13671,6 +13713,7 @@ exports[`history > singleplayer undo/redo > should create new history entry on i }, "previousSelectedElementIds": {}, "resizingElement": null, + "scrollConstraints": null, "scrollX": 0, "scrollY": 0, "searchMatches": null, @@ -13973,6 +14016,7 @@ exports[`history > singleplayer undo/redo > should create new history entry on s }, "previousSelectedElementIds": {}, "resizingElement": null, + "scrollConstraints": null, "scrollX": -50, "scrollY": -50, "searchMatches": null, @@ -14216,6 +14260,7 @@ exports[`history > singleplayer undo/redo > should disable undo/redo buttons whe }, "previousSelectedElementIds": {}, "resizingElement": null, + "scrollConstraints": null, "scrollX": 0, "scrollY": 0, "searchMatches": null, @@ -14454,6 +14499,7 @@ exports[`history > singleplayer undo/redo > should end up with no history entry }, "previousSelectedElementIds": {}, "resizingElement": null, + "scrollConstraints": null, "scrollX": 0, "scrollY": 0, "searchMatches": null, @@ -14694,6 +14740,7 @@ exports[`history > singleplayer undo/redo > should iterate through the history w "id0": true, }, "resizingElement": null, + "scrollConstraints": null, "scrollX": 0, "scrollY": 0, "searchMatches": null, @@ -14940,6 +14987,7 @@ exports[`history > singleplayer undo/redo > should not clear the redo stack on s }, "previousSelectedElementIds": {}, "resizingElement": null, + "scrollConstraints": null, "scrollX": 0, "scrollY": 0, "searchMatches": null, @@ -15275,6 +15323,7 @@ exports[`history > singleplayer undo/redo > should not collapse when applying co }, "previousSelectedElementIds": {}, "resizingElement": null, + "scrollConstraints": null, "scrollX": 0, "scrollY": 0, "searchMatches": null, @@ -15443,6 +15492,7 @@ exports[`history > singleplayer undo/redo > should not end up with history entry }, "previousSelectedElementIds": {}, "resizingElement": null, + "scrollConstraints": null, "scrollX": 0, "scrollY": 0, "searchMatches": null, @@ -15731,6 +15781,7 @@ exports[`history > singleplayer undo/redo > should not end up with history entry }, "previousSelectedElementIds": {}, "resizingElement": null, + "scrollConstraints": null, "scrollX": 0, "scrollY": 0, "searchMatches": null, @@ -15995,6 +16046,7 @@ exports[`history > singleplayer undo/redo > should not modify anything on unrela }, "previousSelectedElementIds": {}, "resizingElement": null, + "scrollConstraints": null, "scrollX": 0, "scrollY": 0, "searchMatches": null, @@ -16148,6 +16200,7 @@ exports[`history > singleplayer undo/redo > should not override appstate changes "id0": true, }, "resizingElement": null, + "scrollConstraints": null, "scrollX": 0, "scrollY": 0, "searchMatches": null, @@ -16432,6 +16485,7 @@ exports[`history > singleplayer undo/redo > should support appstate name or view }, "previousSelectedElementIds": {}, "resizingElement": null, + "scrollConstraints": null, "scrollX": 0, "scrollY": 0, "searchMatches": null, @@ -16594,6 +16648,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding "id0": true, }, "resizingElement": null, + "scrollConstraints": null, "scrollX": 0, "scrollY": 0, "searchMatches": null, @@ -17343,6 +17398,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding "id0": true, }, "resizingElement": null, + "scrollConstraints": null, "scrollX": 0, "scrollY": 0, "searchMatches": null, @@ -17990,6 +18046,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding "id0": true, }, "resizingElement": null, + "scrollConstraints": null, "scrollX": 0, "scrollY": 0, "searchMatches": null, @@ -18635,6 +18692,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding }, "previousSelectedElementIds": {}, "resizingElement": null, + "scrollConstraints": null, "scrollX": 0, "scrollY": 0, "searchMatches": null, @@ -19387,6 +19445,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding "id0": true, }, "resizingElement": null, + "scrollConstraints": null, "scrollX": 0, "scrollY": 0, "searchMatches": null, @@ -20156,6 +20215,7 @@ exports[`history > singleplayer undo/redo > should support changes in elements' "id0": true, }, "resizingElement": null, + "scrollConstraints": null, "scrollX": 0, "scrollY": 0, "searchMatches": null, @@ -20637,6 +20697,7 @@ exports[`history > singleplayer undo/redo > should support duplication of groups "id1": true, }, "resizingElement": null, + "scrollConstraints": null, "scrollX": 0, "scrollY": 0, "searchMatches": null, @@ -21149,6 +21210,7 @@ exports[`history > singleplayer undo/redo > should support element creation, del "id3": true, }, "resizingElement": null, + "scrollConstraints": null, "scrollX": 0, "scrollY": 0, "searchMatches": null, @@ -21609,6 +21671,7 @@ exports[`history > singleplayer undo/redo > should support linear element creati "id0": true, }, "resizingElement": null, + "scrollConstraints": null, "scrollX": 0, "scrollY": 0, "searchMatches": null, diff --git a/packages/excalidraw/tests/__snapshots__/regressionTests.test.tsx.snap b/packages/excalidraw/tests/__snapshots__/regressionTests.test.tsx.snap index e502925b25..0081c5d594 100644 --- a/packages/excalidraw/tests/__snapshots__/regressionTests.test.tsx.snap +++ b/packages/excalidraw/tests/__snapshots__/regressionTests.test.tsx.snap @@ -88,6 +88,7 @@ exports[`given element A and group of elements B and given both are selected whe "id6": true, }, "resizingElement": null, + "scrollConstraints": null, "scrollX": 0, "scrollY": 0, "scrolledOutside": false, @@ -515,6 +516,7 @@ exports[`given element A and group of elements B and given both are selected whe "id6": true, }, "resizingElement": null, + "scrollConstraints": null, "scrollX": 0, "scrollY": 0, "scrolledOutside": false, @@ -928,6 +930,7 @@ exports[`regression tests > Cmd/Ctrl-click exclusively select element under poin }, "previousSelectedElementIds": {}, "resizingElement": null, + "scrollConstraints": null, "scrollX": 0, "scrollY": 0, "scrolledOutside": false, @@ -1495,6 +1498,7 @@ exports[`regression tests > Drags selected element when hitting only bounding bo }, "previousSelectedElementIds": {}, "resizingElement": null, + "scrollConstraints": null, "scrollX": 0, "scrollY": 0, "scrolledOutside": false, @@ -1705,6 +1709,7 @@ exports[`regression tests > adjusts z order when grouping > [end of test] appSta "id0": true, }, "resizingElement": null, + "scrollConstraints": null, "scrollX": 0, "scrollY": 0, "scrolledOutside": false, @@ -2090,6 +2095,7 @@ exports[`regression tests > alt-drag duplicates an element > [end of test] appSt "id0": true, }, "resizingElement": null, + "scrollConstraints": null, "scrollX": 0, "scrollY": 0, "scrolledOutside": false, @@ -2334,6 +2340,7 @@ exports[`regression tests > arrow keys > [end of test] appState 1`] = ` }, "previousSelectedElementIds": {}, "resizingElement": null, + "scrollConstraints": null, "scrollX": 0, "scrollY": 0, "scrolledOutside": false, @@ -2517,6 +2524,7 @@ exports[`regression tests > can drag element that covers another element, while "id6": true, }, "resizingElement": null, + "scrollConstraints": null, "scrollX": 0, "scrollY": 0, "scrolledOutside": false, @@ -2841,6 +2849,7 @@ exports[`regression tests > change the properties of a shape > [end of test] app }, "previousSelectedElementIds": {}, "resizingElement": null, + "scrollConstraints": null, "scrollX": 0, "scrollY": 0, "scrolledOutside": false, @@ -3099,6 +3108,7 @@ exports[`regression tests > click on an element and drag it > [dragged] appState "id0": true, }, "resizingElement": null, + "scrollConstraints": null, "scrollX": 0, "scrollY": 0, "scrolledOutside": false, @@ -3341,6 +3351,7 @@ exports[`regression tests > click on an element and drag it > [end of test] appS "id0": true, }, "resizingElement": null, + "scrollConstraints": null, "scrollX": 0, "scrollY": 0, "scrolledOutside": false, @@ -3578,6 +3589,7 @@ exports[`regression tests > click to select a shape > [end of test] appState 1`] "id3": true, }, "resizingElement": null, + "scrollConstraints": null, "scrollX": 0, "scrollY": 0, "scrolledOutside": false, @@ -3837,6 +3849,7 @@ exports[`regression tests > click-drag to select a group > [end of test] appStat "id6": true, }, "resizingElement": null, + "scrollConstraints": null, "scrollX": 0, "scrollY": 0, "scrolledOutside": false, @@ -4150,6 +4163,7 @@ exports[`regression tests > deleting last but one element in editing group shoul }, "previousSelectedElementIds": {}, "resizingElement": null, + "scrollConstraints": null, "scrollX": 0, "scrollY": 0, "scrolledOutside": false, @@ -4590,6 +4604,7 @@ exports[`regression tests > deselects group of selected elements on pointer down "id3": true, }, "resizingElement": null, + "scrollConstraints": null, "scrollX": 0, "scrollY": 0, "scrolledOutside": false, @@ -4874,6 +4889,7 @@ exports[`regression tests > deselects group of selected elements on pointer up w "id3": true, }, "resizingElement": null, + "scrollConstraints": null, "scrollX": 0, "scrollY": 0, "scrolledOutside": false, @@ -5150,6 +5166,7 @@ exports[`regression tests > deselects selected element on pointer down when poin "id0": true, }, "resizingElement": null, + "scrollConstraints": null, "scrollX": 0, "scrollY": 0, "scrolledOutside": false, @@ -5359,6 +5376,7 @@ exports[`regression tests > deselects selected element, on pointer up, when clic "id0": true, }, "resizingElement": null, + "scrollConstraints": null, "scrollX": 0, "scrollY": 0, "scrolledOutside": false, @@ -5558,6 +5576,7 @@ exports[`regression tests > double click to edit a group > [end of test] appStat }, "previousSelectedElementIds": {}, "resizingElement": null, + "scrollConstraints": null, "scrollX": 0, "scrollY": 0, "scrolledOutside": false, @@ -5955,6 +5974,7 @@ exports[`regression tests > drags selected elements from point inside common bou "id3": true, }, "resizingElement": null, + "scrollConstraints": null, "scrollX": 0, "scrollY": 0, "scrolledOutside": false, @@ -6250,6 +6270,7 @@ exports[`regression tests > draw every type of shape > [end of test] appState 1` }, "previousSelectedElementIds": {}, "resizingElement": null, + "scrollConstraints": null, "scrollX": 0, "scrollY": 0, "scrolledOutside": false, @@ -7042,6 +7063,7 @@ exports[`regression tests > given a group of selected elements with an element t "id6": true, }, "resizingElement": null, + "scrollConstraints": null, "scrollX": 0, "scrollY": 0, "scrolledOutside": false, @@ -7376,6 +7398,7 @@ exports[`regression tests > given a selected element A and a not selected elemen "id0": true, }, "resizingElement": null, + "scrollConstraints": null, "scrollX": 0, "scrollY": 0, "scrolledOutside": false, @@ -7656,6 +7679,7 @@ exports[`regression tests > given selected element A with lower z-index than uns "id0": true, }, "resizingElement": null, + "scrollConstraints": null, "scrollX": 0, "scrollY": 0, "scrolledOutside": false, @@ -7892,6 +7916,7 @@ exports[`regression tests > given selected element A with lower z-index than uns "id0": true, }, "resizingElement": null, + "scrollConstraints": null, "scrollX": 0, "scrollY": 0, "scrolledOutside": false, @@ -8131,6 +8156,7 @@ exports[`regression tests > key 2 selects rectangle tool > [end of test] appStat }, "previousSelectedElementIds": {}, "resizingElement": null, + "scrollConstraints": null, "scrollX": 0, "scrollY": 0, "scrolledOutside": false, @@ -8312,6 +8338,7 @@ exports[`regression tests > key 3 selects diamond tool > [end of test] appState }, "previousSelectedElementIds": {}, "resizingElement": null, + "scrollConstraints": null, "scrollX": 0, "scrollY": 0, "scrolledOutside": false, @@ -8493,6 +8520,7 @@ exports[`regression tests > key 4 selects ellipse tool > [end of test] appState }, "previousSelectedElementIds": {}, "resizingElement": null, + "scrollConstraints": null, "scrollX": 0, "scrollY": 0, "scrolledOutside": false, @@ -8674,6 +8702,7 @@ exports[`regression tests > key 5 selects arrow tool > [end of test] appState 1` }, "previousSelectedElementIds": {}, "resizingElement": null, + "scrollConstraints": null, "scrollX": 0, "scrollY": 0, "scrolledOutside": false, @@ -8907,6 +8936,7 @@ exports[`regression tests > key 6 selects line tool > [end of test] appState 1`] }, "previousSelectedElementIds": {}, "resizingElement": null, + "scrollConstraints": null, "scrollX": 0, "scrollY": 0, "scrolledOutside": false, @@ -9138,6 +9168,7 @@ exports[`regression tests > key 7 selects freedraw tool > [end of test] appState }, "previousSelectedElementIds": {}, "resizingElement": null, + "scrollConstraints": null, "scrollX": 0, "scrollY": 0, "scrolledOutside": false, @@ -9331,6 +9362,7 @@ exports[`regression tests > key a selects arrow tool > [end of test] appState 1` }, "previousSelectedElementIds": {}, "resizingElement": null, + "scrollConstraints": null, "scrollX": 0, "scrollY": 0, "scrolledOutside": false, @@ -9564,6 +9596,7 @@ exports[`regression tests > key d selects diamond tool > [end of test] appState }, "previousSelectedElementIds": {}, "resizingElement": null, + "scrollConstraints": null, "scrollX": 0, "scrollY": 0, "scrolledOutside": false, @@ -9745,6 +9778,7 @@ exports[`regression tests > key l selects line tool > [end of test] appState 1`] }, "previousSelectedElementIds": {}, "resizingElement": null, + "scrollConstraints": null, "scrollX": 0, "scrollY": 0, "scrolledOutside": false, @@ -9976,6 +10010,7 @@ exports[`regression tests > key o selects ellipse tool > [end of test] appState }, "previousSelectedElementIds": {}, "resizingElement": null, + "scrollConstraints": null, "scrollX": 0, "scrollY": 0, "scrolledOutside": false, @@ -10157,6 +10192,7 @@ exports[`regression tests > key p selects freedraw tool > [end of test] appState }, "previousSelectedElementIds": {}, "resizingElement": null, + "scrollConstraints": null, "scrollX": 0, "scrollY": 0, "scrolledOutside": false, @@ -10350,6 +10386,7 @@ exports[`regression tests > key r selects rectangle tool > [end of test] appStat }, "previousSelectedElementIds": {}, "resizingElement": null, + "scrollConstraints": null, "scrollX": 0, "scrollY": 0, "scrolledOutside": false, @@ -10535,6 +10572,7 @@ exports[`regression tests > make a group and duplicate it > [end of test] appSta "id6": true, }, "resizingElement": null, + "scrollConstraints": null, "scrollX": 0, "scrollY": 0, "scrolledOutside": false, @@ -11065,6 +11103,7 @@ exports[`regression tests > noop interaction after undo shouldn't create history "id0": true, }, "resizingElement": null, + "scrollConstraints": null, "scrollX": 0, "scrollY": 0, "scrolledOutside": false, @@ -11344,6 +11383,7 @@ exports[`regression tests > pinch-to-zoom works > [end of test] appState 1`] = ` }, "previousSelectedElementIds": {}, "resizingElement": null, + "scrollConstraints": null, "scrollX": "-6.25000", "scrollY": 0, "scrolledOutside": false, @@ -11470,6 +11510,7 @@ exports[`regression tests > shift click on selected element should deselect it o "id0": true, }, "resizingElement": null, + "scrollConstraints": null, "scrollX": 0, "scrollY": 0, "scrolledOutside": false, @@ -11672,6 +11713,7 @@ exports[`regression tests > shift-click to multiselect, then drag > [end of test "id3": true, }, "resizingElement": null, + "scrollConstraints": null, "scrollX": 0, "scrollY": 0, "scrolledOutside": false, @@ -11993,6 +12035,7 @@ exports[`regression tests > should group elements and ungroup them > [end of tes "id6": true, }, "resizingElement": null, + "scrollConstraints": null, "scrollX": 0, "scrollY": 0, "scrolledOutside": false, @@ -12424,6 +12467,7 @@ exports[`regression tests > single-clicking on a subgroup of a selected group sh "id3": true, }, "resizingElement": null, + "scrollConstraints": null, "scrollX": 0, "scrollY": 0, "scrolledOutside": false, @@ -13063,6 +13107,7 @@ exports[`regression tests > spacebar + drag scrolls the canvas > [end of test] a }, "previousSelectedElementIds": {}, "resizingElement": null, + "scrollConstraints": null, "scrollX": 60, "scrollY": 60, "scrolledOutside": false, @@ -13189,6 +13234,7 @@ exports[`regression tests > supports nested groups > [end of test] appState 1`] "id0": true, }, "resizingElement": null, + "scrollConstraints": null, "scrollX": 0, "scrollY": 0, "scrolledOutside": false, @@ -13822,6 +13868,7 @@ exports[`regression tests > switches from group of selected elements to another "id6": true, }, "resizingElement": null, + "scrollConstraints": null, "scrollX": 0, "scrollY": 0, "scrolledOutside": false, @@ -14161,6 +14208,7 @@ exports[`regression tests > switches selected element on pointer down > [end of "id3": true, }, "resizingElement": null, + "scrollConstraints": null, "scrollX": 0, "scrollY": 0, "scrolledOutside": false, @@ -14424,6 +14472,7 @@ exports[`regression tests > two-finger scroll works > [end of test] appState 1`] }, "previousSelectedElementIds": {}, "resizingElement": null, + "scrollConstraints": null, "scrollX": 20, "scrollY": "-18.53553", "scrolledOutside": false, @@ -14548,6 +14597,7 @@ exports[`regression tests > undo/redo drawing an element > [end of test] appStat }, "previousSelectedElementIds": {}, "resizingElement": null, + "scrollConstraints": null, "scrollX": 0, "scrollY": 0, "scrolledOutside": false, @@ -14913,6 +14963,7 @@ exports[`regression tests > updates fontSize & fontFamily appState > [end of tes }, "previousSelectedElementIds": {}, "resizingElement": null, + "scrollConstraints": null, "scrollX": 0, "scrollY": 0, "scrolledOutside": false, @@ -15040,6 +15091,7 @@ exports[`regression tests > zoom hotkeys > [end of test] appState 1`] = ` }, "previousSelectedElementIds": {}, "resizingElement": null, + "scrollConstraints": null, "scrollX": 0, "scrollY": 0, "scrolledOutside": false, diff --git a/packages/utils/tests/__snapshots__/export.test.ts.snap b/packages/utils/tests/__snapshots__/export.test.ts.snap index f59d0a9e84..ed5db811bf 100644 --- a/packages/utils/tests/__snapshots__/export.test.ts.snap +++ b/packages/utils/tests/__snapshots__/export.test.ts.snap @@ -85,6 +85,7 @@ exports[`exportToSvg > with default arguments 1`] = ` }, "previousSelectedElementIds": {}, "resizingElement": null, + "scrollConstraints": null, "scrollX": 0, "scrollY": 0, "scrolledOutside": false,