From fdd6c65fd9d15be05cf6f833c563eb6ca8c42315 Mon Sep 17 00:00:00 2001 From: Ryan Di Date: Mon, 24 Mar 2025 21:00:47 +1100 Subject: [PATCH] fix regression --- packages/excalidraw/components/App.tsx | 2 +- .../__snapshots__/contextmenu.test.tsx.snap | 17 ++++++ .../tests/__snapshots__/history.test.tsx.snap | 58 +++++++++++++++++++ .../regressionTests.test.tsx.snap | 52 +++++++++++++++++ .../utils/__snapshots__/export.test.ts.snap | 1 + 5 files changed, 129 insertions(+), 1 deletion(-) diff --git a/packages/excalidraw/components/App.tsx b/packages/excalidraw/components/App.tsx index 85d31721f..89512c068 100644 --- a/packages/excalidraw/components/App.tsx +++ b/packages/excalidraw/components/App.tsx @@ -7055,7 +7055,7 @@ class App extends React.Component { event: React.PointerEvent, pointerDownState: PointerDownState, ): boolean => { - if (this.state.activeTool.type === "selection" && !event.altKey) { + if (this.state.activeTool.type === "selection") { const elements = this.scene.getNonDeletedElements(); const elementsMap = this.scene.getNonDeletedElementsMap(); const selectedElements = this.scene.getSelectedElements(this.state); diff --git a/packages/excalidraw/tests/__snapshots__/contextmenu.test.tsx.snap b/packages/excalidraw/tests/__snapshots__/contextmenu.test.tsx.snap index 3f79731ea..b7484fe07 100644 --- a/packages/excalidraw/tests/__snapshots__/contextmenu.test.tsx.snap +++ b/packages/excalidraw/tests/__snapshots__/contextmenu.test.tsx.snap @@ -5,6 +5,7 @@ exports[`contextMenu element > right-clicking on a group should select whole gro "activeEmbeddable": null, "activeTool": { "customType": null, + "fromSelection": false, "lastActiveTool": null, "locked": false, "type": "selection", @@ -1089,6 +1090,7 @@ exports[`contextMenu element > selecting 'Add to library' in context menu adds e "activeEmbeddable": null, "activeTool": { "customType": null, + "fromSelection": false, "lastActiveTool": null, "locked": false, "type": "selection", @@ -1309,6 +1311,7 @@ exports[`contextMenu element > selecting 'Bring forward' in context menu brings "activeEmbeddable": null, "activeTool": { "customType": null, + "fromSelection": false, "lastActiveTool": null, "locked": false, "type": "selection", @@ -1644,6 +1647,7 @@ exports[`contextMenu element > selecting 'Bring to front' in context menu brings "activeEmbeddable": null, "activeTool": { "customType": null, + "fromSelection": false, "lastActiveTool": null, "locked": false, "type": "selection", @@ -1979,6 +1983,7 @@ exports[`contextMenu element > selecting 'Copy styles' in context menu copies st "activeEmbeddable": null, "activeTool": { "customType": null, + "fromSelection": false, "lastActiveTool": null, "locked": false, "type": "selection", @@ -2199,6 +2204,7 @@ exports[`contextMenu element > selecting 'Delete' in context menu deletes elemen "activeEmbeddable": null, "activeTool": { "customType": null, + "fromSelection": false, "lastActiveTool": null, "locked": false, "type": "selection", @@ -2443,6 +2449,7 @@ exports[`contextMenu element > selecting 'Duplicate' in context menu duplicates "activeEmbeddable": null, "activeTool": { "customType": null, + "fromSelection": false, "lastActiveTool": null, "locked": false, "type": "selection", @@ -2748,6 +2755,7 @@ exports[`contextMenu element > selecting 'Group selection' in context menu group "activeEmbeddable": null, "activeTool": { "customType": null, + "fromSelection": false, "lastActiveTool": null, "locked": false, "type": "selection", @@ -3121,6 +3129,7 @@ exports[`contextMenu element > selecting 'Paste styles' in context menu pastes s "activeEmbeddable": null, "activeTool": { "customType": null, + "fromSelection": false, "lastActiveTool": null, "locked": false, "type": "selection", @@ -3600,6 +3609,7 @@ exports[`contextMenu element > selecting 'Send backward' in context menu sends e "activeEmbeddable": null, "activeTool": { "customType": null, + "fromSelection": false, "lastActiveTool": null, "locked": false, "type": "selection", @@ -3927,6 +3937,7 @@ exports[`contextMenu element > selecting 'Send to back' in context menu sends el "activeEmbeddable": null, "activeTool": { "customType": null, + "fromSelection": false, "lastActiveTool": null, "locked": false, "type": "selection", @@ -4254,6 +4265,7 @@ exports[`contextMenu element > selecting 'Ungroup selection' in context menu ung "activeEmbeddable": null, "activeTool": { "customType": null, + "fromSelection": false, "lastActiveTool": null, "locked": false, "type": "selection", @@ -4661,6 +4673,7 @@ exports[`contextMenu element > shows 'Group selection' in context menu for multi "activeEmbeddable": null, "activeTool": { "customType": null, + "fromSelection": false, "lastActiveTool": null, "locked": false, "type": "selection", @@ -5883,6 +5896,7 @@ exports[`contextMenu element > shows 'Ungroup selection' in context menu for gro "activeEmbeddable": null, "activeTool": { "customType": null, + "fromSelection": false, "lastActiveTool": null, "locked": false, "type": "selection", @@ -7151,6 +7165,7 @@ exports[`contextMenu element > shows context menu for canvas > [end of test] app "activeEmbeddable": null, "activeTool": { "customType": null, + "fromSelection": false, "lastActiveTool": null, "locked": false, "type": "selection", @@ -7829,6 +7844,7 @@ exports[`contextMenu element > shows context menu for element > [end of test] ap "activeEmbeddable": null, "activeTool": { "customType": null, + "fromSelection": false, "lastActiveTool": null, "locked": false, "type": "selection", @@ -8818,6 +8834,7 @@ exports[`contextMenu element > shows context menu for element > [end of test] ap "activeEmbeddable": null, "activeTool": { "customType": null, + "fromSelection": false, "lastActiveTool": null, "locked": false, "type": "selection", diff --git a/packages/excalidraw/tests/__snapshots__/history.test.tsx.snap b/packages/excalidraw/tests/__snapshots__/history.test.tsx.snap index efc94ee61..c9ff665af 100644 --- a/packages/excalidraw/tests/__snapshots__/history.test.tsx.snap +++ b/packages/excalidraw/tests/__snapshots__/history.test.tsx.snap @@ -5,6 +5,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl "activeEmbeddable": null, "activeTool": { "customType": null, + "fromSelection": false, "lastActiveTool": null, "locked": false, "type": "selection", @@ -605,6 +606,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl "activeEmbeddable": null, "activeTool": { "customType": null, + "fromSelection": false, "lastActiveTool": null, "locked": false, "type": "selection", @@ -1113,6 +1115,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl "activeEmbeddable": null, "activeTool": { "customType": null, + "fromSelection": false, "lastActiveTool": null, "locked": false, "type": "selection", @@ -1485,6 +1488,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl "activeEmbeddable": null, "activeTool": { "customType": null, + "fromSelection": false, "lastActiveTool": null, "locked": false, "type": "selection", @@ -1858,6 +1862,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl "activeEmbeddable": null, "activeTool": { "customType": null, + "fromSelection": false, "lastActiveTool": null, "locked": false, "type": "selection", @@ -2129,6 +2134,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl "activeEmbeddable": null, "activeTool": { "customType": null, + "fromSelection": false, "lastActiveTool": null, "locked": false, "type": "selection", @@ -2569,6 +2575,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and "activeEmbeddable": null, "activeTool": { "customType": null, + "fromSelection": false, "lastActiveTool": null, "locked": false, "type": "selection", @@ -2872,6 +2879,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and "activeEmbeddable": null, "activeTool": { "customType": null, + "fromSelection": false, "lastActiveTool": null, "locked": false, "type": "selection", @@ -3160,6 +3168,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and "activeEmbeddable": null, "activeTool": { "customType": null, + "fromSelection": false, "lastActiveTool": null, "locked": false, "type": "selection", @@ -3458,6 +3467,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and "activeEmbeddable": null, "activeTool": { "customType": null, + "fromSelection": false, "lastActiveTool": null, "locked": false, "type": "selection", @@ -3748,6 +3758,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and "activeEmbeddable": null, "activeTool": { "customType": null, + "fromSelection": false, "lastActiveTool": null, "locked": false, "type": "selection", @@ -3987,6 +3998,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and "activeEmbeddable": null, "activeTool": { "customType": null, + "fromSelection": false, "lastActiveTool": null, "locked": false, "type": "selection", @@ -4250,6 +4262,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and "activeEmbeddable": null, "activeTool": { "customType": null, + "fromSelection": false, "lastActiveTool": null, "locked": false, "type": "selection", @@ -4527,6 +4540,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and "activeEmbeddable": null, "activeTool": { "customType": null, + "fromSelection": false, "lastActiveTool": null, "locked": false, "type": "selection", @@ -4762,6 +4776,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and "activeEmbeddable": null, "activeTool": { "customType": null, + "fromSelection": false, "lastActiveTool": null, "locked": false, "type": "selection", @@ -4997,6 +5012,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and "activeEmbeddable": null, "activeTool": { "customType": null, + "fromSelection": false, "lastActiveTool": null, "locked": false, "type": "selection", @@ -5230,6 +5246,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and "activeEmbeddable": null, "activeTool": { "customType": null, + "fromSelection": false, "lastActiveTool": null, "locked": false, "type": "selection", @@ -5463,6 +5480,7 @@ exports[`history > multiplayer undo/redo > conflicts in frames and their childre "activeEmbeddable": null, "activeTool": { "customType": null, + "fromSelection": false, "lastActiveTool": null, "locked": false, "type": "selection", @@ -5726,6 +5744,7 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh "activeEmbeddable": null, "activeTool": { "customType": null, + "fromSelection": false, "lastActiveTool": null, "locked": false, "type": "selection", @@ -6061,6 +6080,7 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh "activeEmbeddable": null, "activeTool": { "customType": null, + "fromSelection": false, "lastActiveTool": null, "locked": false, "type": "selection", @@ -6490,6 +6510,7 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh "activeEmbeddable": null, "activeTool": { "customType": null, + "fromSelection": false, "lastActiveTool": null, "locked": false, "type": "selection", @@ -6872,6 +6893,7 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh "activeEmbeddable": null, "activeTool": { "customType": null, + "fromSelection": false, "lastActiveTool": null, "locked": false, "type": "selection", @@ -7195,6 +7217,7 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh "activeEmbeddable": null, "activeTool": { "customType": null, + "fromSelection": false, "lastActiveTool": null, "locked": false, "type": "selection", @@ -7497,6 +7520,7 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh "activeEmbeddable": null, "activeTool": { "customType": null, + "fromSelection": false, "lastActiveTool": null, "locked": false, "type": "selection", @@ -7730,6 +7754,7 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh "activeEmbeddable": null, "activeTool": { "customType": null, + "fromSelection": false, "lastActiveTool": null, "locked": false, "type": "selection", @@ -8089,6 +8114,7 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh "activeEmbeddable": null, "activeTool": { "customType": null, + "fromSelection": false, "lastActiveTool": null, "locked": false, "type": "selection", @@ -8448,6 +8474,7 @@ exports[`history > multiplayer undo/redo > should not let remote changes to inte "activeEmbeddable": null, "activeTool": { "customType": null, + "fromSelection": false, "lastActiveTool": null, "locked": false, "type": "selection", @@ -8856,6 +8883,7 @@ exports[`history > multiplayer undo/redo > should not let remote changes to inte "activeEmbeddable": null, "activeTool": { "customType": null, + "fromSelection": false, "lastActiveTool": null, "locked": false, "type": "freedraw", @@ -9147,6 +9175,7 @@ exports[`history > multiplayer undo/redo > should not let remote changes to inte "activeEmbeddable": null, "activeTool": { "customType": null, + "fromSelection": false, "lastActiveTool": null, "locked": false, "type": "selection", @@ -9416,6 +9445,7 @@ exports[`history > multiplayer undo/redo > should not override remote changes on "activeEmbeddable": null, "activeTool": { "customType": null, + "fromSelection": false, "lastActiveTool": null, "locked": false, "type": "selection", @@ -9684,6 +9714,7 @@ exports[`history > multiplayer undo/redo > should not override remote changes on "activeEmbeddable": null, "activeTool": { "customType": null, + "fromSelection": false, "lastActiveTool": null, "locked": false, "type": "selection", @@ -9919,6 +9950,7 @@ exports[`history > multiplayer undo/redo > should override remotely added groups "activeEmbeddable": null, "activeTool": { "customType": null, + "fromSelection": false, "lastActiveTool": null, "locked": false, "type": "selection", @@ -10224,6 +10256,7 @@ exports[`history > multiplayer undo/redo > should override remotely added points "activeEmbeddable": null, "activeTool": { "customType": null, + "fromSelection": false, "lastActiveTool": null, "locked": false, "type": "selection", @@ -10568,6 +10601,7 @@ exports[`history > multiplayer undo/redo > should redistribute deltas when eleme "activeEmbeddable": null, "activeTool": { "customType": null, + "fromSelection": false, "lastActiveTool": null, "locked": false, "type": "selection", @@ -10807,6 +10841,7 @@ exports[`history > multiplayer undo/redo > should redraw arrows on undo > [end o "activeEmbeddable": null, "activeTool": { "customType": null, + "fromSelection": false, "lastActiveTool": null, "locked": false, "type": "selection", @@ -11260,6 +11295,7 @@ exports[`history > multiplayer undo/redo > should update history entries after r "activeEmbeddable": null, "activeTool": { "customType": null, + "fromSelection": false, "lastActiveTool": null, "locked": false, "type": "selection", @@ -11518,6 +11554,7 @@ exports[`history > singleplayer undo/redo > remounting undo/redo buttons should "activeEmbeddable": null, "activeTool": { "customType": null, + "fromSelection": false, "lastActiveTool": null, "locked": false, "type": "selection", @@ -11761,6 +11798,7 @@ exports[`history > singleplayer undo/redo > should clear the redo stack on eleme "activeEmbeddable": null, "activeTool": { "customType": null, + "fromSelection": false, "lastActiveTool": null, "locked": false, "type": "selection", @@ -12006,6 +12044,7 @@ exports[`history > singleplayer undo/redo > should create entry when selecting f "activeEmbeddable": null, "activeTool": { "customType": null, + "fromSelection": false, "lastActiveTool": null, "locked": false, "type": "freedraw", @@ -12411,6 +12450,7 @@ exports[`history > singleplayer undo/redo > should create new history entry on s "activeEmbeddable": null, "activeTool": { "customType": null, + "fromSelection": false, "lastActiveTool": null, "locked": false, "type": "selection", @@ -12662,6 +12702,7 @@ exports[`history > singleplayer undo/redo > should disable undo/redo buttons whe "activeEmbeddable": null, "activeTool": { "customType": null, + "fromSelection": false, "lastActiveTool": null, "locked": false, "type": "selection", @@ -12907,6 +12948,7 @@ exports[`history > singleplayer undo/redo > should end up with no history entry "activeEmbeddable": null, "activeTool": { "customType": null, + "fromSelection": false, "lastActiveTool": null, "locked": false, "type": "selection", @@ -13152,6 +13194,7 @@ exports[`history > singleplayer undo/redo > should iterate through the history w "activeEmbeddable": null, "activeTool": { "customType": null, + "fromSelection": false, "lastActiveTool": null, "locked": false, "type": "selection", @@ -13403,6 +13446,7 @@ exports[`history > singleplayer undo/redo > should not clear the redo stack on s "activeEmbeddable": null, "activeTool": { "customType": null, + "fromSelection": false, "lastActiveTool": null, "locked": false, "type": "selection", @@ -13739,6 +13783,7 @@ exports[`history > singleplayer undo/redo > should not collapse when applying co "activeEmbeddable": null, "activeTool": { "customType": null, + "fromSelection": false, "lastActiveTool": null, "locked": false, "type": "selection", @@ -13915,6 +13960,7 @@ exports[`history > singleplayer undo/redo > should not end up with history entry "activeEmbeddable": null, "activeTool": { "customType": null, + "fromSelection": false, "lastActiveTool": null, "locked": false, "type": "selection", @@ -14207,6 +14253,7 @@ exports[`history > singleplayer undo/redo > should not end up with history entry "activeEmbeddable": null, "activeTool": { "customType": null, + "fromSelection": false, "lastActiveTool": null, "locked": false, "type": "selection", @@ -14478,6 +14525,7 @@ exports[`history > singleplayer undo/redo > should not override appstate changes "activeEmbeddable": null, "activeTool": { "customType": null, + "fromSelection": false, "lastActiveTool": null, "locked": false, "type": "selection", @@ -14757,6 +14805,7 @@ exports[`history > singleplayer undo/redo > should support appstate name or view "activeEmbeddable": null, "activeTool": { "customType": null, + "fromSelection": false, "lastActiveTool": null, "locked": false, "type": "selection", @@ -14922,6 +14971,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding "activeEmbeddable": null, "activeTool": { "customType": null, + "fromSelection": false, "lastActiveTool": null, "locked": false, "type": "selection", @@ -15618,6 +15668,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding "activeEmbeddable": null, "activeTool": { "customType": null, + "fromSelection": false, "lastActiveTool": null, "locked": false, "type": "selection", @@ -16238,6 +16289,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding "activeEmbeddable": null, "activeTool": { "customType": null, + "fromSelection": false, "lastActiveTool": null, "locked": false, "type": "selection", @@ -16858,6 +16910,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding "activeEmbeddable": null, "activeTool": { "customType": null, + "fromSelection": false, "lastActiveTool": null, "locked": false, "type": "selection", @@ -17569,6 +17622,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding "activeEmbeddable": null, "activeTool": { "customType": null, + "fromSelection": false, "lastActiveTool": null, "locked": false, "type": "selection", @@ -18317,6 +18371,7 @@ exports[`history > singleplayer undo/redo > should support changes in elements' "activeEmbeddable": null, "activeTool": { "customType": null, + "fromSelection": false, "lastActiveTool": null, "locked": false, "type": "selection", @@ -18795,6 +18850,7 @@ exports[`history > singleplayer undo/redo > should support duplication of groups "activeEmbeddable": null, "activeTool": { "customType": null, + "fromSelection": false, "lastActiveTool": null, "locked": false, "type": "selection", @@ -19321,6 +19377,7 @@ exports[`history > singleplayer undo/redo > should support element creation, del "activeEmbeddable": null, "activeTool": { "customType": null, + "fromSelection": false, "lastActiveTool": null, "locked": false, "type": "selection", @@ -19781,6 +19838,7 @@ exports[`history > singleplayer undo/redo > should support linear element creati "activeEmbeddable": null, "activeTool": { "customType": null, + "fromSelection": false, "lastActiveTool": null, "locked": false, "type": "selection", diff --git a/packages/excalidraw/tests/__snapshots__/regressionTests.test.tsx.snap b/packages/excalidraw/tests/__snapshots__/regressionTests.test.tsx.snap index 26eb30ca6..a203234aa 100644 --- a/packages/excalidraw/tests/__snapshots__/regressionTests.test.tsx.snap +++ b/packages/excalidraw/tests/__snapshots__/regressionTests.test.tsx.snap @@ -5,6 +5,7 @@ exports[`given element A and group of elements B and given both are selected whe "activeEmbeddable": null, "activeTool": { "customType": null, + "fromSelection": false, "lastActiveTool": null, "locked": false, "type": "selection", @@ -421,6 +422,7 @@ exports[`given element A and group of elements B and given both are selected whe "activeEmbeddable": null, "activeTool": { "customType": null, + "fromSelection": false, "lastActiveTool": null, "locked": false, "type": "selection", @@ -828,6 +830,7 @@ exports[`regression tests > Cmd/Ctrl-click exclusively select element under poin "activeEmbeddable": null, "activeTool": { "customType": null, + "fromSelection": false, "lastActiveTool": null, "locked": false, "type": "selection", @@ -1374,6 +1377,7 @@ exports[`regression tests > Drags selected element when hitting only bounding bo "activeEmbeddable": null, "activeTool": { "customType": null, + "fromSelection": false, "lastActiveTool": null, "locked": false, "type": "selection", @@ -1579,6 +1583,7 @@ exports[`regression tests > adjusts z order when grouping > [end of test] appSta "activeEmbeddable": null, "activeTool": { "customType": null, + "fromSelection": false, "lastActiveTool": null, "locked": false, "type": "selection", @@ -1955,6 +1960,7 @@ exports[`regression tests > alt-drag duplicates an element > [end of test] appSt "activeEmbeddable": null, "activeTool": { "customType": null, + "fromSelection": false, "lastActiveTool": null, "locked": false, "type": "selection", @@ -2196,6 +2202,7 @@ exports[`regression tests > arrow keys > [end of test] appState 1`] = ` "activeEmbeddable": null, "activeTool": { "customType": null, + "fromSelection": false, "lastActiveTool": null, "locked": false, "type": "selection", @@ -2377,6 +2384,7 @@ exports[`regression tests > can drag element that covers another element, while "activeEmbeddable": null, "activeTool": { "customType": null, + "fromSelection": false, "lastActiveTool": null, "locked": false, "type": "selection", @@ -2698,6 +2706,7 @@ exports[`regression tests > change the properties of a shape > [end of test] app "activeEmbeddable": null, "activeTool": { "customType": null, + "fromSelection": false, "lastActiveTool": null, "locked": false, "type": "selection", @@ -2945,6 +2954,7 @@ exports[`regression tests > click on an element and drag it > [dragged] appState "activeEmbeddable": null, "activeTool": { "customType": null, + "fromSelection": false, "lastActiveTool": null, "locked": false, "type": "selection", @@ -3189,6 +3199,7 @@ exports[`regression tests > click on an element and drag it > [end of test] appS "activeEmbeddable": null, "activeTool": { "customType": null, + "fromSelection": false, "lastActiveTool": null, "locked": false, "type": "selection", @@ -3420,6 +3431,7 @@ exports[`regression tests > click to select a shape > [end of test] appState 1`] "activeEmbeddable": null, "activeTool": { "customType": null, + "fromSelection": false, "lastActiveTool": null, "locked": false, "type": "selection", @@ -3677,6 +3689,7 @@ exports[`regression tests > click-drag to select a group > [end of test] appStat "activeEmbeddable": null, "activeTool": { "customType": null, + "fromSelection": false, "lastActiveTool": null, "locked": false, "type": "selection", @@ -3989,6 +4002,7 @@ exports[`regression tests > deleting last but one element in editing group shoul "activeEmbeddable": null, "activeTool": { "customType": null, + "fromSelection": false, "lastActiveTool": null, "locked": false, "type": "selection", @@ -4412,6 +4426,7 @@ exports[`regression tests > deselects group of selected elements on pointer down "activeEmbeddable": null, "activeTool": { "customType": null, + "fromSelection": false, "lastActiveTool": null, "locked": false, "type": "selection", @@ -4696,6 +4711,7 @@ exports[`regression tests > deselects group of selected elements on pointer up w "activeEmbeddable": null, "activeTool": { "customType": null, + "fromSelection": false, "lastActiveTool": null, "locked": false, "type": "selection", @@ -4950,6 +4966,7 @@ exports[`regression tests > deselects selected element on pointer down when poin "activeEmbeddable": null, "activeTool": { "customType": null, + "fromSelection": false, "lastActiveTool": null, "locked": false, "type": "selection", @@ -5161,6 +5178,7 @@ exports[`regression tests > deselects selected element, on pointer up, when clic "activeEmbeddable": null, "activeTool": { "customType": null, + "fromSelection": false, "lastActiveTool": null, "locked": false, "type": "selection", @@ -5361,6 +5379,7 @@ exports[`regression tests > double click to edit a group > [end of test] appStat "activeEmbeddable": null, "activeTool": { "customType": null, + "fromSelection": false, "lastActiveTool": null, "locked": false, "type": "selection", @@ -5744,6 +5763,7 @@ exports[`regression tests > drags selected elements from point inside common bou "activeEmbeddable": null, "activeTool": { "customType": null, + "fromSelection": false, "lastActiveTool": null, "locked": false, "type": "selection", @@ -6035,6 +6055,7 @@ exports[`regression tests > draw every type of shape > [end of test] appState 1` "activeEmbeddable": null, "activeTool": { "customType": null, + "fromSelection": false, "lastActiveTool": null, "locked": false, "type": "freedraw", @@ -6844,6 +6865,7 @@ exports[`regression tests > given a group of selected elements with an element t "activeEmbeddable": null, "activeTool": { "customType": null, + "fromSelection": false, "lastActiveTool": null, "locked": false, "type": "selection", @@ -7175,6 +7197,7 @@ exports[`regression tests > given a selected element A and a not selected elemen "activeEmbeddable": null, "activeTool": { "customType": null, + "fromSelection": false, "lastActiveTool": null, "locked": false, "type": "selection", @@ -7452,6 +7475,7 @@ exports[`regression tests > given selected element A with lower z-index than uns "activeEmbeddable": null, "activeTool": { "customType": null, + "fromSelection": false, "lastActiveTool": null, "locked": false, "type": "selection", @@ -7687,6 +7711,7 @@ exports[`regression tests > given selected element A with lower z-index than uns "activeEmbeddable": null, "activeTool": { "customType": null, + "fromSelection": false, "lastActiveTool": null, "locked": false, "type": "selection", @@ -7925,6 +7950,7 @@ exports[`regression tests > key 2 selects rectangle tool > [end of test] appStat "activeEmbeddable": null, "activeTool": { "customType": null, + "fromSelection": false, "lastActiveTool": null, "locked": false, "type": "selection", @@ -8106,6 +8132,7 @@ exports[`regression tests > key 3 selects diamond tool > [end of test] appState "activeEmbeddable": null, "activeTool": { "customType": null, + "fromSelection": false, "lastActiveTool": null, "locked": false, "type": "selection", @@ -8287,6 +8314,7 @@ exports[`regression tests > key 4 selects ellipse tool > [end of test] appState "activeEmbeddable": null, "activeTool": { "customType": null, + "fromSelection": false, "lastActiveTool": null, "locked": false, "type": "selection", @@ -8468,6 +8496,7 @@ exports[`regression tests > key 5 selects arrow tool > [end of test] appState 1` "activeEmbeddable": null, "activeTool": { "customType": null, + "fromSelection": false, "lastActiveTool": null, "locked": false, "type": "selection", @@ -8692,6 +8721,7 @@ exports[`regression tests > key 6 selects line tool > [end of test] appState 1`] "activeEmbeddable": null, "activeTool": { "customType": null, + "fromSelection": false, "lastActiveTool": null, "locked": false, "type": "selection", @@ -8915,6 +8945,7 @@ exports[`regression tests > key 7 selects freedraw tool > [end of test] appState "activeEmbeddable": null, "activeTool": { "customType": null, + "fromSelection": false, "lastActiveTool": null, "locked": false, "type": "freedraw", @@ -9110,6 +9141,7 @@ exports[`regression tests > key a selects arrow tool > [end of test] appState 1` "activeEmbeddable": null, "activeTool": { "customType": null, + "fromSelection": false, "lastActiveTool": null, "locked": false, "type": "selection", @@ -9334,6 +9366,7 @@ exports[`regression tests > key d selects diamond tool > [end of test] appState "activeEmbeddable": null, "activeTool": { "customType": null, + "fromSelection": false, "lastActiveTool": null, "locked": false, "type": "selection", @@ -9515,6 +9548,7 @@ exports[`regression tests > key l selects line tool > [end of test] appState 1`] "activeEmbeddable": null, "activeTool": { "customType": null, + "fromSelection": false, "lastActiveTool": null, "locked": false, "type": "selection", @@ -9738,6 +9772,7 @@ exports[`regression tests > key o selects ellipse tool > [end of test] appState "activeEmbeddable": null, "activeTool": { "customType": null, + "fromSelection": false, "lastActiveTool": null, "locked": false, "type": "selection", @@ -9919,6 +9954,7 @@ exports[`regression tests > key p selects freedraw tool > [end of test] appState "activeEmbeddable": null, "activeTool": { "customType": null, + "fromSelection": false, "lastActiveTool": null, "locked": false, "type": "freedraw", @@ -10114,6 +10150,7 @@ exports[`regression tests > key r selects rectangle tool > [end of test] appStat "activeEmbeddable": null, "activeTool": { "customType": null, + "fromSelection": false, "lastActiveTool": null, "locked": false, "type": "selection", @@ -10295,6 +10332,7 @@ exports[`regression tests > make a group and duplicate it > [end of test] appSta "activeEmbeddable": null, "activeTool": { "customType": null, + "fromSelection": false, "lastActiveTool": null, "locked": false, "type": "selection", @@ -10810,6 +10848,7 @@ exports[`regression tests > noop interaction after undo shouldn't create history "activeEmbeddable": null, "activeTool": { "customType": null, + "fromSelection": false, "lastActiveTool": null, "locked": false, "type": "selection", @@ -11088,6 +11127,7 @@ exports[`regression tests > pinch-to-zoom works > [end of test] appState 1`] = ` "activeEmbeddable": null, "activeTool": { "customType": null, + "fromSelection": false, "lastActiveTool": null, "locked": false, "type": "selection", @@ -11215,6 +11255,7 @@ exports[`regression tests > shift click on selected element should deselect it o "activeEmbeddable": null, "activeTool": { "customType": null, + "fromSelection": false, "lastActiveTool": null, "locked": false, "type": "selection", @@ -11415,6 +11456,7 @@ exports[`regression tests > shift-click to multiselect, then drag > [end of test "activeEmbeddable": null, "activeTool": { "customType": null, + "fromSelection": false, "lastActiveTool": null, "locked": false, "type": "selection", @@ -11727,6 +11769,7 @@ exports[`regression tests > should group elements and ungroup them > [end of tes "activeEmbeddable": null, "activeTool": { "customType": null, + "fromSelection": false, "lastActiveTool": null, "locked": false, "type": "selection", @@ -12140,6 +12183,7 @@ exports[`regression tests > single-clicking on a subgroup of a selected group sh "activeEmbeddable": null, "activeTool": { "customType": null, + "fromSelection": false, "lastActiveTool": null, "locked": false, "type": "selection", @@ -12754,6 +12798,7 @@ exports[`regression tests > spacebar + drag scrolls the canvas > [end of test] a "activeEmbeddable": null, "activeTool": { "customType": null, + "fromSelection": false, "lastActiveTool": null, "locked": false, "type": "selection", @@ -12884,6 +12929,7 @@ exports[`regression tests > supports nested groups > [end of test] appState 1`] "activeEmbeddable": null, "activeTool": { "customType": null, + "fromSelection": false, "lastActiveTool": null, "locked": false, "type": "selection", @@ -13469,6 +13515,7 @@ exports[`regression tests > switches from group of selected elements to another "activeEmbeddable": null, "activeTool": { "customType": null, + "fromSelection": false, "lastActiveTool": null, "locked": false, "type": "selection", @@ -13808,6 +13855,7 @@ exports[`regression tests > switches selected element on pointer down > [end of "activeEmbeddable": null, "activeTool": { "customType": null, + "fromSelection": false, "lastActiveTool": null, "locked": false, "type": "selection", @@ -14074,6 +14122,7 @@ exports[`regression tests > two-finger scroll works > [end of test] appState 1`] "activeEmbeddable": null, "activeTool": { "customType": null, + "fromSelection": false, "lastActiveTool": null, "locked": false, "type": "selection", @@ -14201,6 +14250,7 @@ exports[`regression tests > undo/redo drawing an element > [end of test] appStat "activeEmbeddable": null, "activeTool": { "customType": null, + "fromSelection": false, "lastActiveTool": null, "locked": false, "type": "selection", @@ -14581,6 +14631,7 @@ exports[`regression tests > updates fontSize & fontFamily appState > [end of tes "activeEmbeddable": null, "activeTool": { "customType": null, + "fromSelection": false, "lastActiveTool": null, "locked": false, "type": "text", @@ -14708,6 +14759,7 @@ exports[`regression tests > zoom hotkeys > [end of test] appState 1`] = ` "activeEmbeddable": null, "activeTool": { "customType": null, + "fromSelection": false, "lastActiveTool": null, "locked": false, "type": "selection", diff --git a/packages/utils/__snapshots__/export.test.ts.snap b/packages/utils/__snapshots__/export.test.ts.snap index 19e1608f6..c6c68aefe 100644 --- a/packages/utils/__snapshots__/export.test.ts.snap +++ b/packages/utils/__snapshots__/export.test.ts.snap @@ -5,6 +5,7 @@ exports[`exportToSvg > with default arguments 1`] = ` "activeEmbeddable": null, "activeTool": { "customType": null, + "fromSelection": false, "lastActiveTool": null, "locked": false, "type": "selection",