From 263d6805e4e9dcc32e2a7768dbe9186c113d4170 Mon Sep 17 00:00:00 2001 From: Mark Tolmacs Date: Tue, 15 Jul 2025 19:11:30 +0200 Subject: [PATCH] Remove invariants from debug feat: expose `applyTo` options, don't commit empty text element (#9744) * Expose applyTo options, skip re-draw for empty text * Don't commit empty text elements test: added test file for distribute (#9754) --- excalidraw-app/components/DebugCanvas.tsx | 21 +- .../linearElementEditor.test.tsx.snap | 6 - .../data/__snapshots__/transform.test.ts.snap | 432 +--- .../__snapshots__/contextmenu.test.tsx.snap | 34 +- .../tests/__snapshots__/history.test.tsx.snap | 2063 ++++++----------- .../tests/__snapshots__/move.test.tsx.snap | 139 -- .../regressionTests.test.tsx.snap | 112 +- .../tests/__snapshots__/export.test.ts.snap | 2 +- 8 files changed, 862 insertions(+), 1947 deletions(-) diff --git a/excalidraw-app/components/DebugCanvas.tsx b/excalidraw-app/components/DebugCanvas.tsx index acd3e5ffcf..722a8366c8 100644 --- a/excalidraw-app/components/DebugCanvas.tsx +++ b/excalidraw-app/components/DebugCanvas.tsx @@ -188,13 +188,6 @@ const renderBindings = ( } if (element.endBinding) { - invariant( - elementsMap - .get(element.endBinding.elementId) - ?.boundElements?.find((e) => e.id === element.id), - "Missing record in boundElements for arrow", - ); - _renderBinding( context, element.endBinding, @@ -217,17 +210,7 @@ const renderBindings = ( boundElement.id, ) as ExcalidrawArrowElement; - invariant( - arrow, - "Arrow element registered as a bound object not found in elementsMap", - ); - invariant( - arrow.startBinding?.elementId === element.id || - arrow.endBinding?.elementId === element.id, - "Arrow element registered as a bound object not found in binding on the arrow element", - ); - - if (arrow.startBinding?.elementId === element.id) { + if (arrow && arrow.startBinding?.elementId === element.id) { _renderBindableBinding( arrow.startBinding, context, @@ -238,7 +221,7 @@ const renderBindings = ( "green", ); } - if (arrow.endBinding?.elementId === element.id) { + if (arrow && arrow.endBinding?.elementId === element.id) { _renderBindableBinding( arrow.endBinding, context, diff --git a/packages/element/tests/__snapshots__/linearElementEditor.test.tsx.snap b/packages/element/tests/__snapshots__/linearElementEditor.test.tsx.snap index 67639e5bde..afd9e11a38 100644 --- a/packages/element/tests/__snapshots__/linearElementEditor.test.tsx.snap +++ b/packages/element/tests/__snapshots__/linearElementEditor.test.tsx.snap @@ -49,9 +49,3 @@ exports[`Test Linear Elements > Test bound text element > should wrap the bound "Online whiteboard collaboration made easy" `; - -exports[`Test Linear Elements > Test bound text element > should wrap the bound text when arrow bound container moves 2`] = ` -"Online whiteboard -collaboration made -easy" -`; diff --git a/packages/excalidraw/data/__snapshots__/transform.test.ts.snap b/packages/excalidraw/data/__snapshots__/transform.test.ts.snap index 5c22a21fd3..3e1092922a 100644 --- a/packages/excalidraw/data/__snapshots__/transform.test.ts.snap +++ b/packages/excalidraw/data/__snapshots__/transform.test.ts.snap @@ -92,8 +92,7 @@ exports[`Test Transform > Test arrow bindings > should bind arrows to existing s 0.04, 0.4633333333333333, ], - "focus": 0, - "gap": 0, + "mode": "orbit", }, "fillStyle": "solid", "frameId": null, @@ -126,8 +125,7 @@ exports[`Test Transform > Test arrow bindings > should bind arrows to existing s 1, 0.5001, ], - "focus": 0, - "gap": 0, + "mode": "orbit", }, "strokeColor": "#1864ab", "strokeStyle": "solid", @@ -152,8 +150,11 @@ exports[`Test Transform > Test arrow bindings > should bind arrows to existing s "endArrowhead": "arrow", "endBinding": { "elementId": "ellipse-1", - "focus": 0.10666666666666667, - "gap": 3.8343264684446097, + "fixedPoint": [ + -0.01, + 0.44666666666666666, + ], + "mode": "orbit", }, "fillStyle": "solid", "frameId": null, @@ -182,8 +183,11 @@ exports[`Test Transform > Test arrow bindings > should bind arrows to existing s "startArrowhead": null, "startBinding": { "elementId": "diamond-1", - "focus": 0, - "gap": 4.535423522449215, + "fixedPoint": [ + 0.9357142857142857, + 0.5001, + ], + "mode": "orbit", }, "strokeColor": "#e67700", "strokeStyle": "solid", @@ -346,8 +350,7 @@ exports[`Test Transform > Test arrow bindings > should bind arrows to existing t -2.05, 0.5001, ], - "focus": 0, - "gap": 0, + "mode": "orbit", }, "fillStyle": "solid", "frameId": null, @@ -380,8 +383,7 @@ exports[`Test Transform > Test arrow bindings > should bind arrows to existing t 1, 0.5001, ], - "focus": 0, - "gap": 0, + "mode": "orbit", }, "strokeColor": "#1e1e1e", "strokeStyle": "solid", @@ -437,392 +439,6 @@ exports[`Test Transform > Test arrow bindings > should bind arrows to existing t } `; -exports[`Test Transform > Test arrow bindings > should bind arrows to shapes when start / end provided without ids 1`] = ` -{ - "angle": 0, - "backgroundColor": "transparent", - "boundElements": [ - { - "id": "id40", - "type": "text", - }, - ], - "customData": undefined, - "elbowed": false, - "endArrowhead": "arrow", - "endBinding": { - "elementId": "id42", - "fixedPoint": [ - 0, - 0.5001, - ], - "focus": 0, - "gap": 0, - }, - "fillStyle": "solid", - "frameId": null, - "groupIds": [], - "height": 0, - "id": Any, - "index": "a0", - "isDeleted": false, - "lastCommittedPoint": null, - "link": null, - "locked": false, - "opacity": 100, - "points": [ - [ - 0, - 0, - ], - [ - 99, - 0, - ], - ], - "roughness": 1, - "roundness": null, - "seed": Any, - "startArrowhead": null, - "startBinding": { - "elementId": "id41", - "fixedPoint": [ - 1, - 0.5001, - ], - "focus": 0, - "gap": 0, - }, - "strokeColor": "#1e1e1e", - "strokeStyle": "solid", - "strokeWidth": 2, - "type": "arrow", - "updated": 1, - "version": 4, - "versionNonce": Any, - "width": 100, - "x": 255.5, - "y": 239, -} -`; - -exports[`Test Transform > Test arrow bindings > should bind arrows to shapes when start / end provided without ids 2`] = ` -{ - "angle": 0, - "autoResize": true, - "backgroundColor": "transparent", - "boundElements": null, - "containerId": "id39", - "customData": undefined, - "fillStyle": "solid", - "fontFamily": 5, - "fontSize": 20, - "frameId": null, - "groupIds": [], - "height": 25, - "id": Any, - "index": "a1", - "isDeleted": false, - "lineHeight": 1.25, - "link": null, - "locked": false, - "opacity": 100, - "originalText": "HELLO WORLD!!", - "roughness": 1, - "roundness": null, - "seed": Any, - "strokeColor": "#1e1e1e", - "strokeStyle": "solid", - "strokeWidth": 2, - "text": "HELLO WORLD!!", - "textAlign": "center", - "type": "text", - "updated": 1, - "version": 3, - "versionNonce": Any, - "verticalAlign": "middle", - "width": 130, - "x": 240, - "y": 226.5, -} -`; - -exports[`Test Transform > Test arrow bindings > should bind arrows to shapes when start / end provided without ids 3`] = ` -{ - "angle": 0, - "backgroundColor": "transparent", - "boundElements": [ - { - "id": "id39", - "type": "arrow", - }, - ], - "customData": undefined, - "fillStyle": "solid", - "frameId": null, - "groupIds": [], - "height": 100, - "id": Any, - "index": "a2", - "isDeleted": false, - "link": null, - "locked": false, - "opacity": 100, - "roughness": 1, - "roundness": null, - "seed": Any, - "strokeColor": "#1e1e1e", - "strokeStyle": "solid", - "strokeWidth": 2, - "type": "rectangle", - "updated": 1, - "version": 3, - "versionNonce": Any, - "width": 100, - "x": 155, - "y": 189, -} -`; - -exports[`Test Transform > Test arrow bindings > should bind arrows to shapes when start / end provided without ids 4`] = ` -{ - "angle": 0, - "backgroundColor": "transparent", - "boundElements": [ - { - "id": "id39", - "type": "arrow", - }, - ], - "customData": undefined, - "fillStyle": "solid", - "frameId": null, - "groupIds": [], - "height": 100, - "id": Any, - "index": "a3", - "isDeleted": false, - "link": null, - "locked": false, - "opacity": 100, - "roughness": 1, - "roundness": null, - "seed": Any, - "strokeColor": "#1e1e1e", - "strokeStyle": "solid", - "strokeWidth": 2, - "type": "ellipse", - "updated": 1, - "version": 3, - "versionNonce": Any, - "width": 100, - "x": 355, - "y": 189, -} -`; - -exports[`Test Transform > Test arrow bindings > should bind arrows to text when start / end provided without ids 1`] = ` -{ - "angle": 0, - "backgroundColor": "transparent", - "boundElements": [ - { - "id": "id44", - "type": "text", - }, - ], - "customData": undefined, - "elbowed": false, - "endArrowhead": "arrow", - "endBinding": { - "elementId": "id46", - "fixedPoint": [ - 0, - 0.5001, - ], - "focus": 0, - "gap": 0, - }, - "fillStyle": "solid", - "frameId": null, - "groupIds": [], - "height": 0, - "id": Any, - "index": "a0", - "isDeleted": false, - "lastCommittedPoint": null, - "link": null, - "locked": false, - "opacity": 100, - "points": [ - [ - 0, - 0, - ], - [ - 99, - 0, - ], - ], - "roughness": 1, - "roundness": null, - "seed": Any, - "startArrowhead": null, - "startBinding": { - "elementId": "id45", - "fixedPoint": [ - 1, - 0.5001, - ], - "focus": 0, - "gap": 0, - }, - "strokeColor": "#1e1e1e", - "strokeStyle": "solid", - "strokeWidth": 2, - "type": "arrow", - "updated": 1, - "version": 4, - "versionNonce": Any, - "width": 100, - "x": 255.5, - "y": 239, -} -`; - -exports[`Test Transform > Test arrow bindings > should bind arrows to text when start / end provided without ids 2`] = ` -{ - "angle": 0, - "autoResize": true, - "backgroundColor": "transparent", - "boundElements": null, - "containerId": "id43", - "customData": undefined, - "fillStyle": "solid", - "fontFamily": 5, - "fontSize": 20, - "frameId": null, - "groupIds": [], - "height": 25, - "id": Any, - "index": "a1", - "isDeleted": false, - "lineHeight": 1.25, - "link": null, - "locked": false, - "opacity": 100, - "originalText": "HELLO WORLD!!", - "roughness": 1, - "roundness": null, - "seed": Any, - "strokeColor": "#1e1e1e", - "strokeStyle": "solid", - "strokeWidth": 2, - "text": "HELLO WORLD!!", - "textAlign": "center", - "type": "text", - "updated": 1, - "version": 3, - "versionNonce": Any, - "verticalAlign": "middle", - "width": 130, - "x": 240, - "y": 226.5, -} -`; - -exports[`Test Transform > Test arrow bindings > should bind arrows to text when start / end provided without ids 3`] = ` -{ - "angle": 0, - "autoResize": true, - "backgroundColor": "transparent", - "boundElements": [ - { - "id": "id43", - "type": "arrow", - }, - ], - "containerId": null, - "customData": undefined, - "fillStyle": "solid", - "fontFamily": 5, - "fontSize": 20, - "frameId": null, - "groupIds": [], - "height": 25, - "id": Any, - "index": "a2", - "isDeleted": false, - "lineHeight": 1.25, - "link": null, - "locked": false, - "opacity": 100, - "originalText": "HEYYYYY", - "roughness": 1, - "roundness": null, - "seed": Any, - "strokeColor": "#1e1e1e", - "strokeStyle": "solid", - "strokeWidth": 2, - "text": "HEYYYYY", - "textAlign": "left", - "type": "text", - "updated": 1, - "version": 3, - "versionNonce": Any, - "verticalAlign": "top", - "width": 70, - "x": 185, - "y": 226.5, -} -`; - -exports[`Test Transform > Test arrow bindings > should bind arrows to text when start / end provided without ids 4`] = ` -{ - "angle": 0, - "autoResize": true, - "backgroundColor": "transparent", - "boundElements": [ - { - "id": "id43", - "type": "arrow", - }, - ], - "containerId": null, - "customData": undefined, - "fillStyle": "solid", - "fontFamily": 5, - "fontSize": 20, - "frameId": null, - "groupIds": [], - "height": 25, - "id": Any, - "index": "a3", - "isDeleted": false, - "lineHeight": 1.25, - "link": null, - "locked": false, - "opacity": 100, - "originalText": "WHATS UP ?", - "roughness": 1, - "roundness": null, - "seed": Any, - "strokeColor": "#1e1e1e", - "strokeStyle": "solid", - "strokeWidth": 2, - "text": "WHATS UP ?", - "textAlign": "left", - "type": "text", - "updated": 1, - "version": 3, - "versionNonce": Any, - "verticalAlign": "top", - "width": 100, - "x": 355, - "y": 226.5, -} -`; - exports[`Test Transform > should not allow duplicate ids 1`] = ` { "angle": 0, @@ -1508,8 +1124,11 @@ exports[`Test Transform > should transform the elements correctly when linear el "endArrowhead": "arrow", "endBinding": { "elementId": "Alice", - "focus": -0, - "gap": 5.299874999999986, + "fixedPoint": [ + -0.07542628418945944, + 0.5001, + ], + "mode": "orbit", }, "fillStyle": "solid", "frameId": null, @@ -1540,8 +1159,11 @@ exports[`Test Transform > should transform the elements correctly when linear el "startArrowhead": null, "startBinding": { "elementId": "Bob", - "focus": 0, - "gap": 1, + "fixedPoint": [ + 1.000004978564514, + 0.5001, + ], + "mode": "orbit", }, "strokeColor": "#1e1e1e", "strokeStyle": "solid", @@ -1575,8 +1197,7 @@ exports[`Test Transform > should transform the elements correctly when linear el 0.46387050630528887, 0.48466257668711654, ], - "focus": 0, - "gap": 0, + "mode": "orbit", }, "fillStyle": "solid", "frameId": null, @@ -1607,8 +1228,7 @@ exports[`Test Transform > should transform the elements correctly when linear el 0.39381496335223337, 1, ], - "focus": 0, - "gap": 0, + "mode": "orbit", }, "strokeColor": "#1e1e1e", "strokeStyle": "solid", diff --git a/packages/excalidraw/tests/__snapshots__/contextmenu.test.tsx.snap b/packages/excalidraw/tests/__snapshots__/contextmenu.test.tsx.snap index 33c11d971c..088ca2f662 100644 --- a/packages/excalidraw/tests/__snapshots__/contextmenu.test.tsx.snap +++ b/packages/excalidraw/tests/__snapshots__/contextmenu.test.tsx.snap @@ -11,7 +11,7 @@ exports[`contextMenu element > right-clicking on a group should select whole gro "locked": false, "type": "selection", }, - "bindMode": "focus", + "bindMode": "orbit", "collaborators": Map {}, "contextMenu": { "items": [ @@ -1084,7 +1084,7 @@ exports[`contextMenu element > selecting 'Add to library' in context menu adds e "locked": false, "type": "selection", }, - "bindMode": "focus", + "bindMode": "orbit", "collaborators": Map {}, "contextMenu": null, "croppingElementId": null, @@ -1298,7 +1298,7 @@ exports[`contextMenu element > selecting 'Bring forward' in context menu brings "locked": false, "type": "selection", }, - "bindMode": "focus", + "bindMode": "orbit", "collaborators": Map {}, "contextMenu": null, "croppingElementId": null, @@ -1629,7 +1629,7 @@ exports[`contextMenu element > selecting 'Bring to front' in context menu brings "locked": false, "type": "selection", }, - "bindMode": "focus", + "bindMode": "orbit", "collaborators": Map {}, "contextMenu": null, "croppingElementId": null, @@ -1960,7 +1960,7 @@ exports[`contextMenu element > selecting 'Copy styles' in context menu copies st "locked": false, "type": "selection", }, - "bindMode": "focus", + "bindMode": "orbit", "collaborators": Map {}, "contextMenu": null, "croppingElementId": null, @@ -2174,7 +2174,7 @@ exports[`contextMenu element > selecting 'Delete' in context menu deletes elemen "locked": false, "type": "selection", }, - "bindMode": "focus", + "bindMode": "orbit", "collaborators": Map {}, "contextMenu": null, "croppingElementId": null, @@ -2415,7 +2415,7 @@ exports[`contextMenu element > selecting 'Duplicate' in context menu duplicates "locked": false, "type": "selection", }, - "bindMode": "focus", + "bindMode": "orbit", "collaborators": Map {}, "contextMenu": null, "croppingElementId": null, @@ -2713,7 +2713,7 @@ exports[`contextMenu element > selecting 'Group selection' in context menu group "locked": false, "type": "selection", }, - "bindMode": "focus", + "bindMode": "orbit", "collaborators": Map {}, "contextMenu": null, "croppingElementId": null, @@ -3085,7 +3085,7 @@ exports[`contextMenu element > selecting 'Paste styles' in context menu pastes s "locked": false, "type": "selection", }, - "bindMode": "focus", + "bindMode": "orbit", "collaborators": Map {}, "contextMenu": null, "croppingElementId": null, @@ -3578,7 +3578,7 @@ exports[`contextMenu element > selecting 'Send backward' in context menu sends e "locked": false, "type": "selection", }, - "bindMode": "focus", + "bindMode": "orbit", "collaborators": Map {}, "contextMenu": null, "croppingElementId": null, @@ -3901,7 +3901,7 @@ exports[`contextMenu element > selecting 'Send to back' in context menu sends el "locked": false, "type": "selection", }, - "bindMode": "focus", + "bindMode": "orbit", "collaborators": Map {}, "contextMenu": null, "croppingElementId": null, @@ -4224,7 +4224,7 @@ exports[`contextMenu element > selecting 'Ungroup selection' in context menu ung "locked": false, "type": "selection", }, - "bindMode": "focus", + "bindMode": "orbit", "collaborators": Map {}, "contextMenu": null, "croppingElementId": null, @@ -4635,7 +4635,7 @@ exports[`contextMenu element > shows 'Group selection' in context menu for multi "locked": false, "type": "selection", }, - "bindMode": "focus", + "bindMode": "orbit", "collaborators": Map {}, "contextMenu": { "items": [ @@ -5852,7 +5852,7 @@ exports[`contextMenu element > shows 'Ungroup selection' in context menu for gro "locked": false, "type": "selection", }, - "bindMode": "focus", + "bindMode": "orbit", "collaborators": Map {}, "contextMenu": { "items": [ @@ -7120,7 +7120,7 @@ exports[`contextMenu element > shows context menu for canvas > [end of test] app "locked": false, "type": "selection", }, - "bindMode": "focus", + "bindMode": "orbit", "collaborators": Map {}, "contextMenu": { "items": [ @@ -7787,7 +7787,7 @@ exports[`contextMenu element > shows context menu for element > [end of test] ap "locked": false, "type": "selection", }, - "bindMode": "focus", + "bindMode": "orbit", "collaborators": Map {}, "contextMenu": { "items": [ @@ -8778,7 +8778,7 @@ exports[`contextMenu element > shows context menu for element > [end of test] ap "locked": false, "type": "selection", }, - "bindMode": "focus", + "bindMode": "orbit", "collaborators": Map {}, "contextMenu": { "items": [ diff --git a/packages/excalidraw/tests/__snapshots__/history.test.tsx.snap b/packages/excalidraw/tests/__snapshots__/history.test.tsx.snap index 2aac6202d0..fa26242f4c 100644 --- a/packages/excalidraw/tests/__snapshots__/history.test.tsx.snap +++ b/packages/excalidraw/tests/__snapshots__/history.test.tsx.snap @@ -11,7 +11,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl "locked": false, "type": "selection", }, - "bindMode": "focus", + "bindMode": "orbit", "collaborators": Map {}, "contextMenu": null, "croppingElementId": null, @@ -120,7 +120,12 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl { "angle": 0, "backgroundColor": "transparent", - "boundElements": [], + "boundElements": [ + { + "id": "id4", + "type": "arrow", + }, + ], "customData": undefined, "fillStyle": "solid", "frameId": null, @@ -139,7 +144,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl "strokeWidth": 2, "type": "rectangle", "updated": 1, - "version": 18, + "version": 3, "width": 100, "x": -100, "y": -50, @@ -150,7 +155,12 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl { "angle": 0, "backgroundColor": "transparent", - "boundElements": [], + "boundElements": [ + { + "id": "id4", + "type": "arrow", + }, + ], "customData": undefined, "fillStyle": "solid", "frameId": null, @@ -169,7 +179,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl "strokeWidth": 2, "type": "rectangle", "updated": 1, - "version": 9, + "version": 3, "width": 100, "x": 100, "y": -50, @@ -185,25 +195,23 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl "elbowed": false, "endArrowhead": "arrow", "endBinding": { - "elementId": "id15", + "elementId": "id1", "fixedPoint": [ - "0.50000", - 1, + "-0.05000", + "0.50967", ], - "focus": 0, - "gap": 1, + "mode": "orbit", }, "fillStyle": "solid", "frameId": null, "groupIds": [], - "height": 150, + "height": "0.96033", "id": "id4", "index": "a2", "isDeleted": false, "lastCommittedPoint": null, "link": null, "locked": false, - "moveMidPointsWithElement": false, "opacity": 100, "points": [ [ @@ -211,8 +219,8 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl 0, ], [ - "125.00500", - 150, + 90, + "0.96033", ], ], "roughness": 1, @@ -220,251 +228,31 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl "type": 2, }, "startArrowhead": null, - "startBinding": null, + "startBinding": { + "elementId": "id0", + "fixedPoint": [ + "0.50010", + "0.50010", + ], + "mode": "orbit", + }, "strokeColor": "#1e1e1e", "strokeStyle": "solid", "strokeWidth": 2, "type": "arrow", "updated": 1, - "version": 37, - "width": "125.00500", - "x": 0, - "y": 0, + "version": 7, + "width": 90, + "x": 5, + "y": "0.00633", } `; -exports[`history > multiplayer undo/redo > conflicts in arrows and their bindable elements > should rebind bindings when both are updated through the history and the arrow got bound to a different element in the meantime > [end of test] element 3 1`] = ` -{ - "angle": 0, - "backgroundColor": "transparent", - "boundElements": [ - { - "id": "id4", - "type": "arrow", - }, - ], - "customData": undefined, - "fillStyle": "solid", - "frameId": null, - "groupIds": [], - "height": 50, - "id": "id15", - "index": "a3", - "isDeleted": false, - "link": null, - "locked": false, - "opacity": 100, - "roughness": 1, - "roundness": null, - "strokeColor": "#1e1e1e", - "strokeStyle": "solid", - "strokeWidth": 2, - "type": "rectangle", - "updated": 1, - "version": 14, - "width": 50, - "x": 100, - "y": 100, -} -`; +exports[`history > multiplayer undo/redo > conflicts in arrows and their bindable elements > should rebind bindings when both are updated through the history and the arrow got bound to a different element in the meantime > [end of test] number of elements 1`] = `3`; -exports[`history > multiplayer undo/redo > conflicts in arrows and their bindable elements > should rebind bindings when both are updated through the history and the arrow got bound to a different element in the meantime > [end of test] number of elements 1`] = `4`; +exports[`history > multiplayer undo/redo > conflicts in arrows and their bindable elements > should rebind bindings when both are updated through the history and the arrow got bound to a different element in the meantime > [end of test] number of renders 1`] = `10`; -exports[`history > multiplayer undo/redo > conflicts in arrows and their bindable elements > should rebind bindings when both are updated through the history and the arrow got bound to a different element in the meantime > [end of test] number of renders 1`] = `21`; - -exports[`history > multiplayer undo/redo > conflicts in arrows and their bindable elements > should rebind bindings when both are updated through the history and the arrow got bound to a different element in the meantime > [end of test] redo stack 1`] = ` -[ - { - "appState": AppStateDelta { - "delta": Delta { - "deleted": {}, - "inserted": {}, - }, - }, - "elements": { - "added": {}, - "removed": {}, - "updated": { - "id0": { - "deleted": { - "version": 17, - }, - "inserted": { - "version": 15, - }, - }, - "id1": { - "deleted": { - "boundElements": [], - "version": 9, - }, - "inserted": { - "boundElements": [ - { - "id": "id4", - "type": "arrow", - }, - ], - "version": 8, - }, - }, - "id15": { - "deleted": { - "boundElements": [ - { - "id": "id4", - "type": "arrow", - }, - ], - "version": 12, - }, - "inserted": { - "boundElements": [], - "version": 11, - }, - }, - "id4": { - "deleted": { - "endBinding": { - "elementId": "id15", - "fixedPoint": [ - "0.50000", - 1, - ], - "focus": 0, - "gap": 1, - }, - "height": "100.98311", - "points": [ - [ - 0, - 0, - ], - [ - "120.00500", - "100.98311", - ], - ], - "startBinding": { - "elementId": "id0", - "focus": "0.02970", - "gap": 5, - }, - "version": 35, - "width": "120.00500", - }, - "inserted": { - "endBinding": { - "elementId": "id1", - "focus": "-0.02052", - "gap": 5, - }, - "height": "0.04690", - "points": [ - [ - 0, - 0, - ], - [ - 90, - "0.04690", - ], - ], - "startBinding": { - "elementId": "id0", - "focus": "0.01841", - "gap": 5, - }, - "version": 32, - "width": 90, - }, - }, - }, - }, - "id": "id22", - }, - { - "appState": AppStateDelta { - "delta": Delta { - "deleted": {}, - "inserted": {}, - }, - }, - "elements": { - "added": {}, - "removed": {}, - "updated": { - "id0": { - "deleted": { - "boundElements": [], - "version": 18, - }, - "inserted": { - "boundElements": [ - { - "id": "id4", - "type": "arrow", - }, - ], - "version": 17, - }, - }, - "id15": { - "deleted": { - "version": 14, - }, - "inserted": { - "version": 12, - }, - }, - "id4": { - "deleted": { - "height": 150, - "points": [ - [ - 0, - 0, - ], - [ - "125.00500", - 150, - ], - ], - "startBinding": null, - "version": 37, - "width": "125.00500", - "x": 0, - "y": 0, - }, - "inserted": { - "height": "100.98311", - "points": [ - [ - 0, - 0, - ], - [ - "120.00500", - "100.98311", - ], - ], - "startBinding": { - "elementId": "id0", - "focus": "0.02970", - "gap": 5, - }, - "version": 35, - "width": "120.00500", - "x": 5, - "y": "49.01689", - }, - }, - }, - }, - "id": "id23", - }, -] -`; +exports[`history > multiplayer undo/redo > conflicts in arrows and their bindable elements > should rebind bindings when both are updated through the history and the arrow got bound to a different element in the meantime > [end of test] redo stack 1`] = `[]`; exports[`history > multiplayer undo/redo > conflicts in arrows and their bindable elements > should rebind bindings when both are updated through the history and the arrow got bound to a different element in the meantime > [end of test] undo stack 1`] = ` [ @@ -588,7 +376,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl 0, ], [ - 100, + 150, 0, ], ], @@ -597,26 +385,140 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl "type": 2, }, "startArrowhead": null, - "startBinding": null, + "startBinding": { + "elementId": "id0", + "fixedPoint": [ + "0.50010", + "0.50010", + ], + "mode": "orbit", + }, "strokeColor": "#1e1e1e", "strokeStyle": "solid", "strokeWidth": 2, "type": "arrow", - "version": 4, - "width": 100, - "x": 0, + "version": 5, + "width": 150, + "x": -50, "y": 0, }, "inserted": { "isDeleted": true, - "version": 3, + "version": 4, + }, + }, + }, + "updated": { + "id0": { + "deleted": { + "boundElements": [ + { + "id": "id4", + "type": "arrow", + }, + ], + "version": 3, + }, + "inserted": { + "boundElements": [], + "version": 2, }, }, }, - "updated": {}, }, "id": "id6", }, + { + "appState": AppStateDelta { + "delta": Delta { + "deleted": {}, + "inserted": {}, + }, + }, + "elements": { + "added": {}, + "removed": {}, + "updated": { + "id1": { + "deleted": { + "boundElements": [ + { + "id": "id4", + "type": "arrow", + }, + ], + "version": 3, + }, + "inserted": { + "boundElements": [], + "version": 2, + }, + }, + "id4": { + "deleted": { + "endBinding": { + "elementId": "id1", + "fixedPoint": [ + "-0.05000", + "0.50967", + ], + "mode": "orbit", + }, + "height": "0.96033", + "points": [ + [ + 0, + 0, + ], + [ + 90, + "0.96033", + ], + ], + "startBinding": { + "elementId": "id0", + "fixedPoint": [ + "0.50010", + "0.50010", + ], + "mode": "orbit", + }, + "version": 7, + "width": 90, + "x": 5, + "y": "0.00633", + }, + "inserted": { + "endBinding": null, + "height": 0, + "points": [ + [ + 0, + 0, + ], + [ + 150, + 0, + ], + ], + "startBinding": { + "elementId": "id0", + "fixedPoint": [ + "0.50010", + "0.50010", + ], + "mode": "orbit", + }, + "version": 5, + "width": 150, + "x": -50, + "y": 0, + }, + }, + }, + }, + "id": "id10", + }, ] `; @@ -631,7 +533,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl "locked": false, "type": "selection", }, - "bindMode": "focus", + "bindMode": "orbit", "collaborators": Map {}, "contextMenu": null, "croppingElementId": null, @@ -740,7 +642,12 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl { "angle": 0, "backgroundColor": "transparent", - "boundElements": [], + "boundElements": [ + { + "id": "id4", + "type": "arrow", + }, + ], "customData": undefined, "fillStyle": "solid", "frameId": null, @@ -759,9 +666,9 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl "strokeWidth": 2, "type": "rectangle", "updated": 1, - "version": 19, + "version": 3, "width": 100, - "x": 150, + "x": -100, "y": -50, } `; @@ -770,7 +677,12 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl { "angle": 0, "backgroundColor": "transparent", - "boundElements": [], + "boundElements": [ + { + "id": "id4", + "type": "arrow", + }, + ], "customData": undefined, "fillStyle": "solid", "frameId": null, @@ -789,9 +701,9 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl "strokeWidth": 2, "type": "rectangle", "updated": 1, - "version": 9, + "version": 3, "width": 100, - "x": 150, + "x": 100, "y": -50, } `; @@ -804,18 +716,24 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl "customData": undefined, "elbowed": false, "endArrowhead": "arrow", - "endBinding": null, + "endBinding": { + "elementId": "id1", + "fixedPoint": [ + "-0.05000", + "0.50010", + ], + "mode": "orbit", + }, "fillStyle": "solid", "frameId": null, "groupIds": [], - "height": 0, + "height": "0.37250", "id": "id4", "index": "a2", "isDeleted": false, "lastCommittedPoint": null, "link": null, "locked": false, - "moveMidPointsWithElement": false, "opacity": 100, "points": [ [ @@ -823,8 +741,8 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl 0, ], [ - 100, - 0, + "90.00000", + "-0.37250", ], ], "roughness": 1, @@ -832,169 +750,31 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl "type": 2, }, "startArrowhead": null, - "startBinding": null, + "startBinding": { + "elementId": "id0", + "fixedPoint": [ + "0.50010", + "0.50010", + ], + "mode": "orbit", + }, "strokeColor": "#1e1e1e", "strokeStyle": "solid", "strokeWidth": 2, "type": "arrow", "updated": 1, - "version": 33, - "width": 100, - "x": 150, - "y": 0, + "version": 8, + "width": "90.00000", + "x": 5, + "y": "0.37283", } `; exports[`history > multiplayer undo/redo > conflicts in arrows and their bindable elements > should rebind bindings when both are updated through the history and there are no conflicting updates in the meantime > [end of test] number of elements 1`] = `3`; -exports[`history > multiplayer undo/redo > conflicts in arrows and their bindable elements > should rebind bindings when both are updated through the history and there are no conflicting updates in the meantime > [end of test] number of renders 1`] = `23`; +exports[`history > multiplayer undo/redo > conflicts in arrows and their bindable elements > should rebind bindings when both are updated through the history and there are no conflicting updates in the meantime > [end of test] number of renders 1`] = `11`; -exports[`history > multiplayer undo/redo > conflicts in arrows and their bindable elements > should rebind bindings when both are updated through the history and there are no conflicting updates in the meantime > [end of test] redo stack 1`] = ` -[ - { - "appState": AppStateDelta { - "delta": Delta { - "deleted": {}, - "inserted": {}, - }, - }, - "elements": { - "added": {}, - "removed": {}, - "updated": { - "id0": { - "deleted": { - "version": 18, - }, - "inserted": { - "version": 16, - }, - }, - "id1": { - "deleted": { - "boundElements": [], - "version": 9, - }, - "inserted": { - "boundElements": [ - { - "id": "id4", - "type": "arrow", - }, - ], - "version": 8, - }, - }, - "id4": { - "deleted": { - "endBinding": null, - "points": [ - [ - 0, - 0, - ], - [ - -45, - 0, - ], - ], - "version": 32, - "width": 45, - }, - "inserted": { - "endBinding": { - "elementId": "id1", - "focus": -0, - "gap": 5, - }, - "points": [ - [ - 0, - 0, - ], - [ - 0, - 0, - ], - ], - "version": 30, - "width": 0, - }, - }, - }, - }, - "id": "id21", - }, - { - "appState": AppStateDelta { - "delta": Delta { - "deleted": {}, - "inserted": {}, - }, - }, - "elements": { - "added": {}, - "removed": {}, - "updated": { - "id0": { - "deleted": { - "boundElements": [], - "version": 19, - }, - "inserted": { - "boundElements": [ - { - "id": "id4", - "type": "arrow", - }, - ], - "version": 18, - }, - }, - "id4": { - "deleted": { - "points": [ - [ - 0, - 0, - ], - [ - 100, - 0, - ], - ], - "startBinding": null, - "version": 33, - "width": 100, - "x": 150, - }, - "inserted": { - "points": [ - [ - 0, - 0, - ], - [ - -45, - 0, - ], - ], - "startBinding": { - "elementId": "id0", - "focus": 0, - "gap": 5, - }, - "version": 32, - "width": 45, - "x": 145, - }, - }, - }, - }, - "id": "id22", - }, -] -`; +exports[`history > multiplayer undo/redo > conflicts in arrows and their bindable elements > should rebind bindings when both are updated through the history and there are no conflicting updates in the meantime > [end of test] redo stack 1`] = `[]`; exports[`history > multiplayer undo/redo > conflicts in arrows and their bindable elements > should rebind bindings when both are updated through the history and there are no conflicting updates in the meantime > [end of test] undo stack 1`] = ` [ @@ -1118,7 +898,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl 0, ], [ - 100, + 150, 0, ], ], @@ -1127,26 +907,140 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl "type": 2, }, "startArrowhead": null, - "startBinding": null, + "startBinding": { + "elementId": "id0", + "fixedPoint": [ + "0.50010", + "0.50010", + ], + "mode": "orbit", + }, "strokeColor": "#1e1e1e", "strokeStyle": "solid", "strokeWidth": 2, "type": "arrow", - "version": 4, - "width": 100, - "x": 0, + "version": 5, + "width": 150, + "x": -50, "y": 0, }, "inserted": { "isDeleted": true, - "version": 3, + "version": 4, + }, + }, + }, + "updated": { + "id0": { + "deleted": { + "boundElements": [ + { + "id": "id4", + "type": "arrow", + }, + ], + "version": 3, + }, + "inserted": { + "boundElements": [], + "version": 2, }, }, }, - "updated": {}, }, "id": "id6", }, + { + "appState": AppStateDelta { + "delta": Delta { + "deleted": {}, + "inserted": {}, + }, + }, + "elements": { + "added": {}, + "removed": {}, + "updated": { + "id1": { + "deleted": { + "boundElements": [ + { + "id": "id4", + "type": "arrow", + }, + ], + "version": 3, + }, + "inserted": { + "boundElements": [], + "version": 2, + }, + }, + "id4": { + "deleted": { + "endBinding": { + "elementId": "id1", + "fixedPoint": [ + "-0.05000", + "0.50010", + ], + "mode": "orbit", + }, + "height": "0.37250", + "points": [ + [ + 0, + 0, + ], + [ + "90.00000", + "-0.37250", + ], + ], + "startBinding": { + "elementId": "id0", + "fixedPoint": [ + "0.50010", + "0.50010", + ], + "mode": "orbit", + }, + "version": 8, + "width": "90.00000", + "x": 5, + "y": "0.37283", + }, + "inserted": { + "endBinding": null, + "height": 0, + "points": [ + [ + 0, + 0, + ], + [ + 150, + 0, + ], + ], + "startBinding": { + "elementId": "id0", + "fixedPoint": [ + "0.50010", + "0.50010", + ], + "mode": "orbit", + }, + "version": 5, + "width": 150, + "x": -50, + "y": 0, + }, + }, + }, + }, + "id": "id10", + }, ] `; @@ -1161,7 +1055,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl "locked": false, "type": "selection", }, - "bindMode": "focus", + "bindMode": "orbit", "collaborators": Map {}, "contextMenu": null, "croppingElementId": null, @@ -1279,13 +1173,12 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl "0.50000", 1, ], - "focus": 0, - "gap": 1, + "mode": "orbit", }, "fillStyle": "solid", "frameId": null, "groupIds": [], - "height": "49.99000", + "height": "31.25668", "id": "id4", "index": "Zz", "isDeleted": false, @@ -1300,8 +1193,8 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl 0, ], [ - "150.01000", - "49.99000", + 90, + "31.25668", ], ], "roughness": 1, @@ -1313,18 +1206,17 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl 1, "0.50000", ], - "focus": 0, - "gap": 1, + "mode": "orbit", }, "strokeColor": "#1e1e1e", "strokeStyle": "solid", "strokeWidth": 2, "type": "arrow", "updated": 1, - "version": 11, - "width": "150.01000", - "x": 0, - "y": "0.01000", + "version": 7, + "width": 90, + "x": 5, + "y": "1.67603", } `; @@ -1356,7 +1248,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl "strokeWidth": 2, "type": "rectangle", "updated": 1, - "version": 7, + "version": 5, "width": 100, "x": -100, "y": -50, @@ -1391,7 +1283,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl "strokeWidth": 2, "type": "rectangle", "updated": 1, - "version": 7, + "version": 5, "width": 100, "x": 100, "y": -50, @@ -1400,7 +1292,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl exports[`history > multiplayer undo/redo > conflicts in arrows and their bindable elements > should rebind remotely added arrow when it's bindable elements are added through the history > [end of test] number of elements 1`] = `3`; -exports[`history > multiplayer undo/redo > conflicts in arrows and their bindable elements > should rebind remotely added arrow when it's bindable elements are added through the history > [end of test] number of renders 1`] = `9`; +exports[`history > multiplayer undo/redo > conflicts in arrows and their bindable elements > should rebind remotely added arrow when it's bindable elements are added through the history > [end of test] number of renders 1`] = `7`; exports[`history > multiplayer undo/redo > conflicts in arrows and their bindable elements > should rebind remotely added arrow when it's bindable elements are added through the history > [end of test] redo stack 1`] = `[]`; @@ -1437,14 +1329,14 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl "strokeStyle": "solid", "strokeWidth": 2, "type": "rectangle", - "version": 7, + "version": 5, "width": 100, "x": -100, "y": -50, }, "inserted": { "isDeleted": true, - "version": 6, + "version": 4, }, }, "id1": { @@ -1468,14 +1360,14 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl "strokeStyle": "solid", "strokeWidth": 2, "type": "rectangle", - "version": 7, + "version": 5, "width": 100, "x": 100, "y": -50, }, "inserted": { "isDeleted": true, - "version": 6, + "version": 4, }, }, }, @@ -1488,8 +1380,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl "0.50000", 1, ], - "focus": 0, - "gap": 1, + "mode": "orbit", }, "startBinding": { "elementId": "id0", @@ -1497,20 +1388,19 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl 1, "0.50000", ], - "focus": 0, - "gap": 1, + "mode": "orbit", }, - "version": 11, + "version": 7, }, "inserted": { "endBinding": null, "startBinding": null, - "version": 8, + "version": 4, }, }, }, }, - "id": "id8", + "id": "id6", }, ] `; @@ -1526,7 +1416,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl "locked": false, "type": "selection", }, - "bindMode": "focus", + "bindMode": "orbit", "collaborators": Map {}, "contextMenu": null, "croppingElementId": null, @@ -1644,20 +1534,18 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl 1, "0.50000", ], - "focus": 0, - "gap": 1, + "mode": "orbit", }, "fillStyle": "solid", "frameId": null, "groupIds": [], - "height": "49.99000", + "height": 100, "id": "id5", "index": "a0", - "isDeleted": false, + "isDeleted": true, "lastCommittedPoint": null, "link": null, "locked": false, - "moveMidPointsWithElement": false, "opacity": 100, "points": [ [ @@ -1665,8 +1553,8 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl 0, ], [ - "249.99000", - "-49.99000", + 100, + 100, ], ], "roughness": 1, @@ -1678,18 +1566,17 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl "0.50000", 1, ], - "focus": 0, - "gap": 1, + "mode": "orbit", }, "strokeColor": "#1e1e1e", "strokeStyle": "solid", "strokeWidth": 2, "type": "arrow", "updated": 1, - "version": 11, - "width": "249.99000", - "x": "-49.99000", - "y": 50, + "version": 4, + "width": 100, + "x": 0, + "y": 0, } `; @@ -1697,12 +1584,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl { "angle": 0, "backgroundColor": "transparent", - "boundElements": [ - { - "id": "id5", - "type": "arrow", - }, - ], + "boundElements": [], "customData": undefined, "fillStyle": "solid", "frameId": null, @@ -1721,7 +1603,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl "strokeWidth": 2, "type": "rectangle", "updated": 1, - "version": 12, + "version": 5, "width": 100, "x": -100, "y": -50, @@ -1732,12 +1614,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl { "angle": 0, "backgroundColor": "transparent", - "boundElements": [ - { - "id": "id5", - "type": "arrow", - }, - ], + "boundElements": [], "customData": undefined, "fillStyle": "solid", "frameId": null, @@ -1756,7 +1633,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl "strokeWidth": 2, "type": "rectangle", "updated": 1, - "version": 11, + "version": 4, "width": 100, "x": 100, "y": -50, @@ -1765,11 +1642,9 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl exports[`history > multiplayer undo/redo > conflicts in arrows and their bindable elements > should rebind remotely added bindable elements when it's arrow is added through the history > [end of test] number of elements 1`] = `3`; -exports[`history > multiplayer undo/redo > conflicts in arrows and their bindable elements > should rebind remotely added bindable elements when it's arrow is added through the history > [end of test] number of renders 1`] = `11`; +exports[`history > multiplayer undo/redo > conflicts in arrows and their bindable elements > should rebind remotely added bindable elements when it's arrow is added through the history > [end of test] number of renders 1`] = `8`; -exports[`history > multiplayer undo/redo > conflicts in arrows and their bindable elements > should rebind remotely added bindable elements when it's arrow is added through the history > [end of test] redo stack 1`] = `[]`; - -exports[`history > multiplayer undo/redo > conflicts in arrows and their bindable elements > should rebind remotely added bindable elements when it's arrow is added through the history > [end of test] undo stack 1`] = ` +exports[`history > multiplayer undo/redo > conflicts in arrows and their bindable elements > should rebind remotely added bindable elements when it's arrow is added through the history > [end of test] redo stack 1`] = ` [ { "appState": AppStateDelta { @@ -1779,10 +1654,13 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl }, }, "elements": { - "added": {}, - "removed": { + "added": { "id5": { "deleted": { + "isDeleted": true, + "version": 4, + }, + "inserted": { "angle": 0, "backgroundColor": "transparent", "boundElements": null, @@ -1795,13 +1673,12 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl 1, "0.50000", ], - "focus": 0, - "gap": 1, + "mode": "orbit", }, "fillStyle": "solid", "frameId": null, "groupIds": [], - "height": "49.99000", + "height": 100, "index": "a0", "isDeleted": false, "lastCommittedPoint": null, @@ -1814,8 +1691,8 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl 0, ], [ - "249.99000", - "-49.99000", + 100, + 100, ], ], "roughness": 1, @@ -1827,62 +1704,60 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl "0.50000", 1, ], - "focus": 0, - "gap": 1, + "mode": "orbit", }, "strokeColor": "#1e1e1e", "strokeStyle": "solid", "strokeWidth": 2, "type": "arrow", - "version": 11, - "width": "249.99000", - "x": "-49.99000", - "y": 50, - }, - "inserted": { - "isDeleted": true, - "version": 8, + "version": 3, + "width": 100, + "x": 0, + "y": 0, }, }, }, + "removed": {}, "updated": { "id0": { "deleted": { + "boundElements": [], + "version": 5, + }, + "inserted": { "boundElements": [ { "id": "id5", "type": "arrow", }, ], - "version": 12, - }, - "inserted": { - "boundElements": [], - "version": 9, + "version": 4, }, }, "id1": { "deleted": { + "boundElements": [], + "version": 4, + }, + "inserted": { "boundElements": [ { "id": "id5", "type": "arrow", }, ], - "version": 11, - }, - "inserted": { - "boundElements": [], - "version": 8, + "version": 3, }, }, }, }, - "id": "id11", + "id": "id8", }, ] `; +exports[`history > multiplayer undo/redo > conflicts in arrows and their bindable elements > should rebind remotely added bindable elements when it's arrow is added through the history > [end of test] undo stack 1`] = `[]`; + exports[`history > multiplayer undo/redo > conflicts in arrows and their bindable elements > should unbind remotely deleted bindable elements from arrow when the arrow is added through the history > [end of test] appState 1`] = ` { "activeEmbeddable": null, @@ -1894,7 +1769,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl "locked": false, "type": "selection", }, - "bindMode": "focus", + "bindMode": "orbit", "collaborators": Map {}, "contextMenu": null, "croppingElementId": null, @@ -2157,7 +2032,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl "locked": false, "type": "selection", }, - "bindMode": "focus", + "bindMode": "orbit", "collaborators": Map {}, "contextMenu": null, "croppingElementId": null, @@ -2231,9 +2106,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl "scrollX": 0, "scrollY": 0, "searchMatches": null, - "selectedElementIds": { - "id4": true, - }, + "selectedElementIds": {}, "selectedElementsAreBeingDragged": false, "selectedGroupIds": {}, "selectionElement": null, @@ -2264,12 +2137,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl { "angle": 0, "backgroundColor": "transparent", - "boundElements": [ - { - "id": "id4", - "type": "arrow", - }, - ], + "boundElements": [], "customData": undefined, "fillStyle": "solid", "frameId": null, @@ -2288,7 +2156,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl "strokeWidth": 2, "type": "rectangle", "updated": 1, - "version": 7, + "version": 4, "width": 100, "x": -100, "y": -50, @@ -2299,12 +2167,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl { "angle": 0, "backgroundColor": "transparent", - "boundElements": [ - { - "id": "id4", - "type": "arrow", - }, - ], + "boundElements": [], "customData": undefined, "fillStyle": "solid", "frameId": null, @@ -2323,10 +2186,10 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl "strokeWidth": 2, "type": "rectangle", "updated": 1, - "version": 8, + "version": 4, "width": 100, - "x": 500, - "y": -500, + "x": 100, + "y": -50, } `; @@ -2341,23 +2204,21 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl "endBinding": { "elementId": "id1", "fixedPoint": [ - 0, + "0.50010", "0.50010", ], - "focus": 0, - "gap": 0, + "mode": "orbit", }, "fillStyle": "solid", "frameId": null, "groupIds": [], - "height": 450, + "height": "0.00725", "id": "id4", "index": "a2", - "isDeleted": false, + "isDeleted": true, "lastCommittedPoint": null, "link": null, "locked": false, - "moveMidPointsWithElement": false, "opacity": 100, "points": [ [ @@ -2365,8 +2226,8 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl 0, ], [ - 500, - -450, + 145, + "0.00725", ], ], "roughness": 1, @@ -2377,29 +2238,148 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl "startBinding": { "elementId": "id0", "fixedPoint": [ - 1, + "0.50010", "0.50010", ], - "focus": 0, - "gap": 0, + "mode": "orbit", }, "strokeColor": "#1e1e1e", "strokeStyle": "solid", "strokeWidth": 2, "type": "arrow", "updated": 1, - "version": 10, - "width": 500, - "x": 0, - "y": "0.01000", + "version": 8, + "width": 145, + "x": -50, + "y": 0, } `; exports[`history > multiplayer undo/redo > conflicts in arrows and their bindable elements > should update bound element points when rectangle was remotely moved and arrow is added back through the history > [end of test] number of elements 1`] = `3`; -exports[`history > multiplayer undo/redo > conflicts in arrows and their bindable elements > should update bound element points when rectangle was remotely moved and arrow is added back through the history > [end of test] number of renders 1`] = `9`; +exports[`history > multiplayer undo/redo > conflicts in arrows and their bindable elements > should update bound element points when rectangle was remotely moved and arrow is added back through the history > [end of test] number of renders 1`] = `7`; -exports[`history > multiplayer undo/redo > conflicts in arrows and their bindable elements > should update bound element points when rectangle was remotely moved and arrow is added back through the history > [end of test] redo stack 1`] = `[]`; +exports[`history > multiplayer undo/redo > conflicts in arrows and their bindable elements > should update bound element points when rectangle was remotely moved and arrow is added back through the history > [end of test] redo stack 1`] = ` +[ + { + "appState": AppStateDelta { + "delta": Delta { + "deleted": { + "selectedElementIds": {}, + "selectedLinearElementId": null, + }, + "inserted": { + "selectedElementIds": { + "id4": true, + }, + "selectedLinearElementId": "id4", + }, + }, + }, + "elements": { + "added": { + "id4": { + "deleted": { + "isDeleted": true, + "version": 8, + }, + "inserted": { + "angle": 0, + "backgroundColor": "transparent", + "boundElements": null, + "customData": undefined, + "elbowed": false, + "endArrowhead": "arrow", + "endBinding": { + "elementId": "id1", + "fixedPoint": [ + "0.50010", + "0.50010", + ], + "mode": "orbit", + }, + "fillStyle": "solid", + "frameId": null, + "groupIds": [], + "height": "0.00725", + "index": "a2", + "isDeleted": false, + "lastCommittedPoint": null, + "link": null, + "locked": false, + "opacity": 100, + "points": [ + [ + 0, + 0, + ], + [ + 145, + "0.00725", + ], + ], + "roughness": 1, + "roundness": { + "type": 2, + }, + "startArrowhead": null, + "startBinding": { + "elementId": "id0", + "fixedPoint": [ + "0.50010", + "0.50010", + ], + "mode": "orbit", + }, + "strokeColor": "#1e1e1e", + "strokeStyle": "solid", + "strokeWidth": 2, + "type": "arrow", + "version": 7, + "width": 145, + "x": -50, + "y": 0, + }, + }, + }, + "removed": {}, + "updated": { + "id0": { + "deleted": { + "boundElements": [], + "version": 4, + }, + "inserted": { + "boundElements": [ + { + "id": "id4", + "type": "arrow", + }, + ], + "version": 3, + }, + }, + "id1": { + "deleted": { + "boundElements": [], + "version": 4, + }, + "inserted": { + "boundElements": [ + { + "id": "id4", + "type": "arrow", + }, + ], + "version": 3, + }, + }, + }, + }, + "id": "id7", + }, +] +`; exports[`history > multiplayer undo/redo > conflicts in arrows and their bindable elements > should update bound element points when rectangle was remotely moved and arrow is added back through the history > [end of test] undo stack 1`] = ` [ @@ -2480,125 +2460,6 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl }, "id": "id3", }, - { - "appState": AppStateDelta { - "delta": Delta { - "deleted": { - "selectedElementIds": { - "id4": true, - }, - "selectedLinearElementId": "id4", - }, - "inserted": { - "selectedElementIds": {}, - "selectedLinearElementId": null, - }, - }, - }, - "elements": { - "added": {}, - "removed": { - "id4": { - "deleted": { - "angle": 0, - "backgroundColor": "transparent", - "boundElements": null, - "customData": undefined, - "elbowed": false, - "endArrowhead": "arrow", - "endBinding": { - "elementId": "id1", - "fixedPoint": [ - 0, - "0.50010", - ], - "focus": 0, - "gap": 0, - }, - "fillStyle": "solid", - "frameId": null, - "groupIds": [], - "height": 450, - "index": "a2", - "isDeleted": false, - "lastCommittedPoint": null, - "link": null, - "locked": false, - "opacity": 100, - "points": [ - [ - 0, - 0, - ], - [ - 500, - -450, - ], - ], - "roughness": 1, - "roundness": { - "type": 2, - }, - "startArrowhead": null, - "startBinding": { - "elementId": "id0", - "fixedPoint": [ - 1, - "0.50010", - ], - "focus": 0, - "gap": 0, - }, - "strokeColor": "#1e1e1e", - "strokeStyle": "solid", - "strokeWidth": 2, - "type": "arrow", - "version": 10, - "width": 500, - "x": 0, - "y": "0.01000", - }, - "inserted": { - "isDeleted": true, - "version": 7, - }, - }, - }, - "updated": { - "id0": { - "deleted": { - "boundElements": [ - { - "id": "id4", - "type": "arrow", - }, - ], - "version": 7, - }, - "inserted": { - "boundElements": [], - "version": 4, - }, - }, - "id1": { - "deleted": { - "boundElements": [ - { - "id": "id4", - "type": "arrow", - }, - ], - "version": 8, - }, - "inserted": { - "boundElements": [], - "version": 5, - }, - }, - }, - }, - "id": "id8", - }, ] `; @@ -2613,7 +2474,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and "locked": false, "type": "selection", }, - "bindMode": "focus", + "bindMode": "orbit", "collaborators": Map {}, "contextMenu": null, "croppingElementId": null, @@ -2875,7 +2736,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and "locked": false, "type": "selection", }, - "bindMode": "focus", + "bindMode": "orbit", "collaborators": Map {}, "contextMenu": null, "croppingElementId": null, @@ -3141,7 +3002,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and "locked": false, "type": "selection", }, - "bindMode": "focus", + "bindMode": "orbit", "collaborators": Map {}, "contextMenu": null, "croppingElementId": null, @@ -3435,7 +3296,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and "locked": false, "type": "selection", }, - "bindMode": "focus", + "bindMode": "orbit", "collaborators": Map {}, "contextMenu": null, "croppingElementId": null, @@ -3721,7 +3582,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and "locked": false, "type": "selection", }, - "bindMode": "focus", + "bindMode": "orbit", "collaborators": Map {}, "contextMenu": null, "croppingElementId": null, @@ -3956,7 +3817,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and "locked": false, "type": "selection", }, - "bindMode": "focus", + "bindMode": "orbit", "collaborators": Map {}, "contextMenu": null, "croppingElementId": null, @@ -4213,7 +4074,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and "locked": false, "type": "selection", }, - "bindMode": "focus", + "bindMode": "orbit", "collaborators": Map {}, "contextMenu": null, "croppingElementId": null, @@ -4484,7 +4345,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and "locked": false, "type": "selection", }, - "bindMode": "focus", + "bindMode": "orbit", "collaborators": Map {}, "contextMenu": null, "croppingElementId": null, @@ -4713,7 +4574,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and "locked": false, "type": "selection", }, - "bindMode": "focus", + "bindMode": "orbit", "collaborators": Map {}, "contextMenu": null, "croppingElementId": null, @@ -4942,7 +4803,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and "locked": false, "type": "selection", }, - "bindMode": "focus", + "bindMode": "orbit", "collaborators": Map {}, "contextMenu": null, "croppingElementId": null, @@ -5169,7 +5030,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and "locked": false, "type": "selection", }, - "bindMode": "focus", + "bindMode": "orbit", "collaborators": Map {}, "contextMenu": null, "croppingElementId": null, @@ -5396,7 +5257,7 @@ exports[`history > multiplayer undo/redo > conflicts in frames and their childre "locked": false, "type": "selection", }, - "bindMode": "focus", + "bindMode": "orbit", "collaborators": Map {}, "contextMenu": null, "croppingElementId": null, @@ -5652,7 +5513,7 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh "locked": false, "type": "selection", }, - "bindMode": "focus", + "bindMode": "orbit", "collaborators": Map {}, "contextMenu": null, "croppingElementId": null, @@ -5914,7 +5775,7 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh "locked": false, "type": "selection", }, - "bindMode": "focus", + "bindMode": "orbit", "collaborators": Map {}, "contextMenu": null, "croppingElementId": null, @@ -6277,7 +6138,7 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh "locked": false, "type": "selection", }, - "bindMode": "focus", + "bindMode": "orbit", "collaborators": Map {}, "contextMenu": null, "croppingElementId": null, @@ -6651,7 +6512,7 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh "locked": false, "type": "selection", }, - "bindMode": "focus", + "bindMode": "orbit", "collaborators": Map {}, "contextMenu": null, "croppingElementId": null, @@ -6963,7 +6824,7 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh "locked": false, "type": "selection", }, - "bindMode": "focus", + "bindMode": "orbit", "collaborators": Map {}, "contextMenu": null, "croppingElementId": null, @@ -7270,7 +7131,7 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh "locked": false, "type": "selection", }, - "bindMode": "focus", + "bindMode": "orbit", "collaborators": Map {}, "contextMenu": null, "croppingElementId": null, @@ -7468,7 +7329,7 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh "locked": false, "type": "selection", }, - "bindMode": "focus", + "bindMode": "orbit", "collaborators": Map {}, "contextMenu": null, "croppingElementId": null, @@ -7820,7 +7681,7 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh "locked": false, "type": "selection", }, - "bindMode": "focus", + "bindMode": "orbit", "collaborators": Map {}, "contextMenu": null, "croppingElementId": null, @@ -8172,7 +8033,7 @@ exports[`history > multiplayer undo/redo > should not let remote changes to inte "locked": false, "type": "selection", }, - "bindMode": "focus", + "bindMode": "orbit", "collaborators": Map {}, "contextMenu": null, "croppingElementId": null, @@ -8578,7 +8439,7 @@ exports[`history > multiplayer undo/redo > should not let remote changes to inte "locked": false, "type": "freedraw", }, - "bindMode": "focus", + "bindMode": "orbit", "collaborators": Map {}, "contextMenu": null, "croppingElementId": null, @@ -8865,7 +8726,7 @@ exports[`history > multiplayer undo/redo > should not let remote changes to inte "locked": false, "type": "selection", }, - "bindMode": "focus", + "bindMode": "orbit", "collaborators": Map {}, "contextMenu": null, "croppingElementId": null, @@ -9129,7 +8990,7 @@ exports[`history > multiplayer undo/redo > should not override remote changes on "locked": false, "type": "selection", }, - "bindMode": "focus", + "bindMode": "orbit", "collaborators": Map {}, "contextMenu": null, "croppingElementId": null, @@ -9394,7 +9255,7 @@ exports[`history > multiplayer undo/redo > should not override remote changes on "locked": false, "type": "selection", }, - "bindMode": "focus", + "bindMode": "orbit", "collaborators": Map {}, "contextMenu": null, "croppingElementId": null, @@ -9626,7 +9487,7 @@ exports[`history > multiplayer undo/redo > should override remotely added groups "locked": false, "type": "selection", }, - "bindMode": "focus", + "bindMode": "orbit", "collaborators": Map {}, "contextMenu": null, "croppingElementId": null, @@ -9923,7 +9784,7 @@ exports[`history > multiplayer undo/redo > should override remotely added points "locked": false, "type": "selection", }, - "bindMode": "focus", + "bindMode": "orbit", "collaborators": Map {}, "contextMenu": null, "croppingElementId": null, @@ -10273,7 +10134,7 @@ exports[`history > multiplayer undo/redo > should redistribute deltas when eleme "locked": false, "type": "selection", }, - "bindMode": "focus", + "bindMode": "orbit", "collaborators": Map {}, "contextMenu": null, "croppingElementId": null, @@ -10498,7 +10359,7 @@ exports[`history > multiplayer undo/redo > should redraw arrows on undo > [end o "locked": false, "type": "selection", }, - "bindMode": "focus", + "bindMode": "orbit", "collaborators": Map {}, "contextMenu": null, "croppingElementId": null, @@ -10676,8 +10537,7 @@ exports[`history > multiplayer undo/redo > should redraw arrows on undo > [end o "0.49919", "-0.03875", ], - "focus": "-0.00161", - "gap": "3.53708", + "mode": "orbit", }, "endIsSpecial": false, "fillStyle": "solid", @@ -10715,8 +10575,7 @@ exports[`history > multiplayer undo/redo > should redraw arrows on undo > [end o "1.03185", "0.49921", ], - "focus": "-0.00159", - "gap": 5, + "mode": "orbit", }, "startIsSpecial": false, "strokeColor": "#1e1e1e", @@ -10764,8 +10623,7 @@ exports[`history > multiplayer undo/redo > should redraw arrows on undo > [end o "0.49919", "-0.03875", ], - "focus": "-0.00161", - "gap": "3.53708", + "mode": "orbit", }, "endIsSpecial": false, "fillStyle": "solid", @@ -10802,8 +10660,7 @@ exports[`history > multiplayer undo/redo > should redraw arrows on undo > [end o "1.03185", "0.49921", ], - "focus": "-0.00159", - "gap": 5, + "mode": "orbit", }, "startIsSpecial": false, "strokeColor": "#1e1e1e", @@ -10946,7 +10803,7 @@ exports[`history > multiplayer undo/redo > should update history entries after r "locked": false, "type": "selection", }, - "bindMode": "focus", + "bindMode": "orbit", "collaborators": Map {}, "contextMenu": null, "croppingElementId": null, @@ -11206,7 +11063,7 @@ exports[`history > singleplayer undo/redo > remounting undo/redo buttons should "locked": false, "type": "selection", }, - "bindMode": "focus", + "bindMode": "orbit", "collaborators": Map {}, "contextMenu": null, "croppingElementId": null, @@ -11441,7 +11298,7 @@ exports[`history > singleplayer undo/redo > should clear the redo stack on eleme "locked": false, "type": "selection", }, - "bindMode": "focus", + "bindMode": "orbit", "collaborators": Map {}, "contextMenu": null, "croppingElementId": null, @@ -11678,7 +11535,7 @@ exports[`history > singleplayer undo/redo > should create entry when selecting f "locked": false, "type": "freedraw", }, - "bindMode": "focus", + "bindMode": "orbit", "collaborators": Map {}, "contextMenu": null, "croppingElementId": null, @@ -12081,7 +11938,7 @@ exports[`history > singleplayer undo/redo > should create new history entry on e "locked": false, "type": "selection", }, - "bindMode": "focus", + "bindMode": "orbit", "collaborators": Map {}, "contextMenu": null, "croppingElementId": null, @@ -12291,7 +12148,7 @@ exports[`history > singleplayer undo/redo > should create new history entry on e "locked": false, "type": "selection", }, - "bindMode": "focus", + "bindMode": "orbit", "collaborators": Map {}, "contextMenu": null, "croppingElementId": null, @@ -12501,7 +12358,7 @@ exports[`history > singleplayer undo/redo > should create new history entry on i "locked": false, "type": "selection", }, - "bindMode": "focus", + "bindMode": "orbit", "collaborators": Map {}, "contextMenu": null, "croppingElementId": null, @@ -12725,7 +12582,7 @@ exports[`history > singleplayer undo/redo > should create new history entry on i "locked": false, "type": "selection", }, - "bindMode": "focus", + "bindMode": "orbit", "collaborators": Map {}, "contextMenu": null, "croppingElementId": null, @@ -12949,7 +12806,7 @@ exports[`history > singleplayer undo/redo > should create new history entry on s "locked": false, "type": "selection", }, - "bindMode": "focus", + "bindMode": "orbit", "collaborators": Map {}, "contextMenu": null, "croppingElementId": null, @@ -13194,7 +13051,7 @@ exports[`history > singleplayer undo/redo > should disable undo/redo buttons whe "locked": false, "type": "selection", }, - "bindMode": "focus", + "bindMode": "orbit", "collaborators": Map {}, "contextMenu": null, "croppingElementId": null, @@ -13431,7 +13288,7 @@ exports[`history > singleplayer undo/redo > should end up with no history entry "locked": false, "type": "selection", }, - "bindMode": "focus", + "bindMode": "orbit", "collaborators": Map {}, "contextMenu": null, "croppingElementId": null, @@ -13668,7 +13525,7 @@ exports[`history > singleplayer undo/redo > should iterate through the history w "locked": false, "type": "selection", }, - "bindMode": "focus", + "bindMode": "orbit", "collaborators": Map {}, "contextMenu": null, "croppingElementId": null, @@ -13915,7 +13772,7 @@ exports[`history > singleplayer undo/redo > should not clear the redo stack on s "locked": false, "type": "selection", }, - "bindMode": "focus", + "bindMode": "orbit", "collaborators": Map {}, "contextMenu": null, "croppingElementId": null, @@ -14246,7 +14103,7 @@ exports[`history > singleplayer undo/redo > should not collapse when applying co "locked": false, "type": "selection", }, - "bindMode": "focus", + "bindMode": "orbit", "collaborators": Map {}, "contextMenu": null, "croppingElementId": null, @@ -14416,7 +14273,7 @@ exports[`history > singleplayer undo/redo > should not end up with history entry "locked": false, "type": "selection", }, - "bindMode": "focus", + "bindMode": "orbit", "collaborators": Map {}, "contextMenu": null, "croppingElementId": null, @@ -14700,7 +14557,7 @@ exports[`history > singleplayer undo/redo > should not end up with history entry "locked": false, "type": "selection", }, - "bindMode": "focus", + "bindMode": "orbit", "collaborators": Map {}, "contextMenu": null, "croppingElementId": null, @@ -14963,7 +14820,7 @@ exports[`history > singleplayer undo/redo > should not modify anything on unrela "locked": false, "type": "selection", }, - "bindMode": "focus", + "bindMode": "orbit", "collaborators": Map {}, "contextMenu": null, "croppingElementId": null, @@ -15116,7 +14973,7 @@ exports[`history > singleplayer undo/redo > should not override appstate changes "locked": false, "type": "selection", }, - "bindMode": "focus", + "bindMode": "orbit", "collaborators": Map {}, "contextMenu": null, "croppingElementId": null, @@ -15398,7 +15255,7 @@ exports[`history > singleplayer undo/redo > should support appstate name or view "locked": false, "type": "selection", }, - "bindMode": "focus", + "bindMode": "orbit", "collaborators": Map {}, "contextMenu": null, "croppingElementId": null, @@ -15560,7 +15417,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding "locked": false, "type": "selection", }, - "bindMode": "focus", + "bindMode": "orbit", "collaborators": Map {}, "contextMenu": null, "croppingElementId": null, @@ -15697,7 +15554,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding "strokeWidth": 2, "type": "rectangle", "updated": 1, - "version": 8, + "version": 4, "width": 100, "x": -100, "y": -50, @@ -15735,7 +15592,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding "textAlign": "center", "type": "text", "updated": 1, - "version": 6, + "version": 4, "verticalAlign": "middle", "width": 30, "x": -65, @@ -15771,7 +15628,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding "strokeWidth": 2, "type": "rectangle", "updated": 1, - "version": 7, + "version": 3, "width": 100, "x": 100, "y": -50, @@ -15789,23 +15646,21 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding "endBinding": { "elementId": "id2", "fixedPoint": [ - 0, + "0.50010", "0.50010", ], - "focus": 0, - "gap": 0, + "mode": "orbit", }, "fillStyle": "solid", "frameId": null, "groupIds": [], - "height": 0, + "height": "0.00725", "id": "id13", "index": "a3", "isDeleted": false, "lastCommittedPoint": null, "link": null, "locked": false, - "moveMidPointsWithElement": false, "opacity": 100, "points": [ [ @@ -15813,8 +15668,8 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding 0, ], [ - 100, - 0, + 145, + "0.00725", ], ], "roughness": 1, @@ -15825,140 +15680,28 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding "startBinding": { "elementId": "id0", "fixedPoint": [ - 1, + "0.50010", "0.50010", ], - "focus": 0, - "gap": 0, + "mode": "orbit", }, "strokeColor": "#1e1e1e", "strokeStyle": "solid", "strokeWidth": 2, "type": "arrow", "updated": 1, - "version": 10, - "width": 100, - "x": 0, - "y": "0.01000", + "version": 7, + "width": 145, + "x": -50, + "y": 0, } `; exports[`history > singleplayer undo/redo > should support bidirectional bindings > should unbind arrow from non deleted bindable elements on deletion and rebind on undo > [end of test] number of elements 1`] = `4`; -exports[`history > singleplayer undo/redo > should support bidirectional bindings > should unbind arrow from non deleted bindable elements on deletion and rebind on undo > [end of test] number of renders 1`] = `12`; +exports[`history > singleplayer undo/redo > should support bidirectional bindings > should unbind arrow from non deleted bindable elements on deletion and rebind on undo > [end of test] number of renders 1`] = `10`; -exports[`history > singleplayer undo/redo > should support bidirectional bindings > should unbind arrow from non deleted bindable elements on deletion and rebind on undo > [end of test] redo stack 1`] = ` -[ - { - "appState": AppStateDelta { - "delta": Delta { - "deleted": { - "selectedElementIds": { - "id13": true, - }, - "selectedLinearElementId": "id13", - }, - "inserted": { - "selectedElementIds": {}, - "selectedLinearElementId": null, - }, - }, - }, - "elements": { - "added": {}, - "removed": { - "id13": { - "deleted": { - "endBinding": { - "elementId": "id2", - "fixedPoint": [ - 0, - "0.50010", - ], - "focus": 0, - "gap": 0, - }, - "isDeleted": false, - "startBinding": { - "elementId": "id0", - "fixedPoint": [ - 1, - "0.50010", - ], - "focus": 0, - "gap": 0, - }, - "version": 10, - }, - "inserted": { - "endBinding": { - "elementId": "id2", - "fixedPoint": [ - 0, - "0.50010", - ], - "focus": 0, - "gap": 0, - }, - "isDeleted": true, - "startBinding": { - "elementId": "id0", - "fixedPoint": [ - 1, - "0.50010", - ], - "focus": 0, - "gap": 0, - }, - "version": 7, - }, - }, - }, - "updated": { - "id0": { - "deleted": { - "boundElements": [ - { - "id": "id13", - "type": "arrow", - }, - ], - "version": 8, - }, - "inserted": { - "boundElements": [], - "version": 5, - }, - }, - "id1": { - "deleted": { - "version": 6, - }, - "inserted": { - "version": 4, - }, - }, - "id2": { - "deleted": { - "boundElements": [ - { - "id": "id13", - "type": "arrow", - }, - ], - "version": 7, - }, - "inserted": { - "boundElements": [], - "version": 4, - }, - }, - }, - }, - "id": "id18", - }, -] -`; +exports[`history > singleplayer undo/redo > should support bidirectional bindings > should unbind arrow from non deleted bindable elements on deletion and rebind on undo > [end of test] redo stack 1`] = `[]`; exports[`history > singleplayer undo/redo > should support bidirectional bindings > should unbind arrow from non deleted bindable elements on deletion and rebind on undo > [end of test] undo stack 1`] = ` [ @@ -16208,16 +15951,15 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding "endBinding": { "elementId": "id2", "fixedPoint": [ - 0, + "0.50010", "0.50010", ], - "focus": 0, - "gap": 0, + "mode": "orbit", }, "fillStyle": "solid", "frameId": null, "groupIds": [], - "height": 0, + "height": "0.00725", "index": "a3", "isDeleted": false, "lastCommittedPoint": null, @@ -16230,8 +15972,8 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding 0, ], [ - 100, - 0, + 145, + "0.00725", ], ], "roughness": 1, @@ -16242,24 +15984,23 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding "startBinding": { "elementId": "id0", "fixedPoint": [ - 1, + "0.50010", "0.50010", ], - "focus": 0, - "gap": 0, + "mode": "orbit", }, "strokeColor": "#1e1e1e", "strokeStyle": "solid", "strokeWidth": 2, "type": "arrow", - "version": 6, - "width": 100, - "x": 0, + "version": 7, + "width": 145, + "x": -50, "y": 0, }, "inserted": { "isDeleted": true, - "version": 5, + "version": 6, }, }, }, @@ -16312,7 +16053,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding "locked": false, "type": "selection", }, - "bindMode": "focus", + "bindMode": "orbit", "collaborators": Map {}, "contextMenu": null, "croppingElementId": null, @@ -16449,7 +16190,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding "strokeWidth": 2, "type": "rectangle", "updated": 1, - "version": 8, + "version": 4, "width": 100, "x": -100, "y": -50, @@ -16487,7 +16228,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding "textAlign": "center", "type": "text", "updated": 1, - "version": 8, + "version": 4, "verticalAlign": "middle", "width": 30, "x": -65, @@ -16523,7 +16264,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding "strokeWidth": 2, "type": "rectangle", "updated": 1, - "version": 7, + "version": 3, "width": 100, "x": 100, "y": -50, @@ -16541,23 +16282,21 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding "endBinding": { "elementId": "id2", "fixedPoint": [ - 0, + "0.50010", "0.50010", ], - "focus": 0, - "gap": 0, + "mode": "orbit", }, "fillStyle": "solid", "frameId": null, "groupIds": [], - "height": 0, + "height": "0.00725", "id": "id13", "index": "a3", "isDeleted": false, "lastCommittedPoint": null, "link": null, "locked": false, - "moveMidPointsWithElement": false, "opacity": 100, "points": [ [ @@ -16565,8 +16304,8 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding 0, ], [ - 100, - 0, + 145, + "0.00725", ], ], "roughness": 1, @@ -16577,27 +16316,26 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding "startBinding": { "elementId": "id0", "fixedPoint": [ - 1, + "0.50010", "0.50010", ], - "focus": 0, - "gap": 0, + "mode": "orbit", }, "strokeColor": "#1e1e1e", "strokeStyle": "solid", "strokeWidth": 2, "type": "arrow", "updated": 1, - "version": 10, - "width": 100, - "x": 0, - "y": "0.01000", + "version": 7, + "width": 145, + "x": -50, + "y": 0, } `; exports[`history > singleplayer undo/redo > should support bidirectional bindings > should unbind arrow from non deleted bindable elements on undo and rebind on redo > [end of test] number of elements 1`] = `4`; -exports[`history > singleplayer undo/redo > should support bidirectional bindings > should unbind arrow from non deleted bindable elements on undo and rebind on redo > [end of test] number of renders 1`] = `12`; +exports[`history > singleplayer undo/redo > should support bidirectional bindings > should unbind arrow from non deleted bindable elements on undo and rebind on redo > [end of test] number of renders 1`] = `10`; exports[`history > singleplayer undo/redo > should support bidirectional bindings > should unbind arrow from non deleted bindable elements on undo and rebind on redo > [end of test] redo stack 1`] = `[]`; @@ -16849,16 +16587,15 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding "endBinding": { "elementId": "id2", "fixedPoint": [ - 0, + "0.50010", "0.50010", ], - "focus": 0, - "gap": 0, + "mode": "orbit", }, "fillStyle": "solid", "frameId": null, "groupIds": [], - "height": 0, + "height": "0.00725", "index": "a3", "isDeleted": false, "lastCommittedPoint": null, @@ -16871,8 +16608,8 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding 0, ], [ - 100, - 0, + 145, + "0.00725", ], ], "roughness": 1, @@ -16883,24 +16620,23 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding "startBinding": { "elementId": "id0", "fixedPoint": [ - 1, + "0.50010", "0.50010", ], - "focus": 0, - "gap": 0, + "mode": "orbit", }, "strokeColor": "#1e1e1e", "strokeStyle": "solid", "strokeWidth": 2, "type": "arrow", - "version": 10, - "width": 100, - "x": 0, - "y": "0.01000", + "version": 7, + "width": 145, + "x": -50, + "y": 0, }, "inserted": { "isDeleted": true, - "version": 7, + "version": 6, }, }, }, @@ -16913,19 +16649,11 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding "type": "arrow", }, ], - "version": 8, + "version": 4, }, "inserted": { "boundElements": [], - "version": 5, - }, - }, - "id1": { - "deleted": { - "version": 8, - }, - "inserted": { - "version": 6, + "version": 3, }, }, "id2": { @@ -16936,16 +16664,16 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding "type": "arrow", }, ], - "version": 7, + "version": 3, }, "inserted": { "boundElements": [], - "version": 4, + "version": 2, }, }, }, }, - "id": "id17", + "id": "id15", }, ] `; @@ -16961,7 +16689,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding "locked": false, "type": "selection", }, - "bindMode": "focus", + "bindMode": "orbit", "collaborators": Map {}, "contextMenu": null, "croppingElementId": null, @@ -17098,7 +16826,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding "strokeWidth": 2, "type": "rectangle", "updated": 1, - "version": 12, + "version": 4, "width": 100, "x": -100, "y": -50, @@ -17136,7 +16864,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding "textAlign": "center", "type": "text", "updated": 1, - "version": 12, + "version": 4, "verticalAlign": "middle", "width": 30, "x": -65, @@ -17172,7 +16900,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding "strokeWidth": 2, "type": "rectangle", "updated": 1, - "version": 9, + "version": 3, "width": 100, "x": 100, "y": -50, @@ -17190,23 +16918,21 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding "endBinding": { "elementId": "id2", "fixedPoint": [ - 0, + "0.50010", "0.50010", ], - "focus": 0, - "gap": 0, + "mode": "orbit", }, "fillStyle": "solid", "frameId": null, "groupIds": [], - "height": 0, + "height": "0.00725", "id": "id13", "index": "a3", "isDeleted": false, "lastCommittedPoint": null, "link": null, "locked": false, - "moveMidPointsWithElement": false, "opacity": 100, "points": [ [ @@ -17214,8 +16940,8 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding 0, ], [ - 100, - 0, + 145, + "0.00725", ], ], "roughness": 1, @@ -17226,27 +16952,26 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding "startBinding": { "elementId": "id0", "fixedPoint": [ - 1, + "0.50010", "0.50010", ], - "focus": 0, - "gap": 0, + "mode": "orbit", }, "strokeColor": "#1e1e1e", "strokeStyle": "solid", "strokeWidth": 2, "type": "arrow", "updated": 1, - "version": 10, - "width": 100, - "x": 0, - "y": "0.01000", + "version": 7, + "width": 145, + "x": -50, + "y": 0, } `; exports[`history > singleplayer undo/redo > should support bidirectional bindings > should unbind everything from non deleted elements when iterating through the whole undo stack and vice versa rebind everything on redo > [end of test] number of elements 1`] = `4`; -exports[`history > singleplayer undo/redo > should support bidirectional bindings > should unbind everything from non deleted elements when iterating through the whole undo stack and vice versa rebind everything on redo > [end of test] number of renders 1`] = `20`; +exports[`history > singleplayer undo/redo > should support bidirectional bindings > should unbind everything from non deleted elements when iterating through the whole undo stack and vice versa rebind everything on redo > [end of test] number of renders 1`] = `10`; exports[`history > singleplayer undo/redo > should support bidirectional bindings > should unbind everything from non deleted elements when iterating through the whole undo stack and vice versa rebind everything on redo > [end of test] redo stack 1`] = `[]`; @@ -17283,14 +17008,14 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding "strokeStyle": "solid", "strokeWidth": 2, "type": "rectangle", - "version": 8, + "version": 2, "width": 100, "x": -100, "y": -50, }, "inserted": { "isDeleted": true, - "version": 7, + "version": 1, }, }, "id1": { @@ -17322,7 +17047,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding "text": "ola", "textAlign": "left", "type": "text", - "version": 9, + "version": 2, "verticalAlign": "top", "width": 100, "x": -200, @@ -17330,7 +17055,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding }, "inserted": { "isDeleted": true, - "version": 8, + "version": 1, }, }, "id2": { @@ -17354,20 +17079,20 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding "strokeStyle": "solid", "strokeWidth": 2, "type": "rectangle", - "version": 6, + "version": 2, "width": 100, "x": 100, "y": -50, }, "inserted": { "isDeleted": true, - "version": 5, + "version": 1, }, }, }, "updated": {}, }, - "id": "id21", + "id": "id4", }, { "appState": AppStateDelta { @@ -17387,7 +17112,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding "removed": {}, "updated": {}, }, - "id": "id22", + "id": "id7", }, { "appState": AppStateDelta { @@ -17407,7 +17132,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding "removed": {}, "updated": {}, }, - "id": "id23", + "id": "id10", }, { "appState": AppStateDelta { @@ -17434,11 +17159,11 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding "type": "text", }, ], - "version": 9, + "version": 3, }, "inserted": { "boundElements": [], - "version": 8, + "version": 2, }, }, "id1": { @@ -17446,7 +17171,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding "containerId": "id0", "height": 25, "textAlign": "center", - "version": 10, + "version": 4, "verticalAlign": "middle", "width": 30, "x": -65, @@ -17456,7 +17181,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding "containerId": null, "height": 100, "textAlign": "left", - "version": 9, + "version": 2, "verticalAlign": "top", "width": 100, "x": -200, @@ -17465,7 +17190,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding }, }, }, - "id": "id24", + "id": "id12", }, { "appState": AppStateDelta { @@ -17498,16 +17223,15 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding "endBinding": { "elementId": "id2", "fixedPoint": [ - 0, + "0.50010", "0.50010", ], - "focus": 0, - "gap": 0, + "mode": "orbit", }, "fillStyle": "solid", "frameId": null, "groupIds": [], - "height": 0, + "height": "0.00725", "index": "a3", "isDeleted": false, "lastCommittedPoint": null, @@ -17520,8 +17244,8 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding 0, ], [ - 100, - 0, + 145, + "0.00725", ], ], "roughness": 1, @@ -17532,24 +17256,23 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding "startBinding": { "elementId": "id0", "fixedPoint": [ - 1, + "0.50010", "0.50010", ], - "focus": 0, - "gap": 0, + "mode": "orbit", }, "strokeColor": "#1e1e1e", "strokeStyle": "solid", "strokeWidth": 2, "type": "arrow", - "version": 10, - "width": 100, - "x": 0, - "y": "0.01000", + "version": 7, + "width": 145, + "x": -50, + "y": 0, }, "inserted": { "isDeleted": true, - "version": 7, + "version": 6, }, }, }, @@ -17562,19 +17285,11 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding "type": "arrow", }, ], - "version": 12, + "version": 4, }, "inserted": { "boundElements": [], - "version": 9, - }, - }, - "id1": { - "deleted": { - "version": 12, - }, - "inserted": { - "version": 10, + "version": 3, }, }, "id2": { @@ -17585,16 +17300,16 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding "type": "arrow", }, ], - "version": 9, + "version": 3, }, "inserted": { "boundElements": [], - "version": 6, + "version": 2, }, }, }, }, - "id": "id25", + "id": "id15", }, ] `; @@ -17610,7 +17325,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding "locked": false, "type": "selection", }, - "bindMode": "focus", + "bindMode": "orbit", "collaborators": Map {}, "contextMenu": null, "croppingElementId": null, @@ -17679,13 +17394,15 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding }, "penDetected": false, "penMode": false, - "previousSelectedElementIds": {}, + "previousSelectedElementIds": { + "id0": true, + }, "resizingElement": null, "scrollX": 0, "scrollY": 0, "searchMatches": null, "selectedElementIds": { - "id0": true, + "id13": true, }, "selectedElementsAreBeingDragged": false, "selectedGroupIds": {}, @@ -17718,14 +17435,14 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding "angle": 0, "backgroundColor": "transparent", "boundElements": [ - { - "id": "id13", - "type": "arrow", - }, { "id": "id1", "type": "text", }, + { + "id": "id13", + "type": "arrow", + }, ], "customData": undefined, "fillStyle": "solid", @@ -17745,7 +17462,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding "strokeWidth": 2, "type": "rectangle", "updated": 1, - "version": 8, + "version": 4, "width": 100, "x": -100, "y": -50, @@ -17783,7 +17500,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding "textAlign": "center", "type": "text", "updated": 1, - "version": 8, + "version": 4, "verticalAlign": "middle", "width": 30, "x": -65, @@ -17819,7 +17536,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding "strokeWidth": 2, "type": "rectangle", "updated": 1, - "version": 5, + "version": 3, "width": 100, "x": 100, "y": -50, @@ -17837,23 +17554,21 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding "endBinding": { "elementId": "id2", "fixedPoint": [ - 0, + "0.50010", "0.50010", ], - "focus": 0, - "gap": 0, + "mode": "orbit", }, "fillStyle": "solid", "frameId": null, "groupIds": [], - "height": 0, + "height": "0.00725", "id": "id13", "index": "a3", "isDeleted": false, "lastCommittedPoint": null, "link": null, "locked": false, - "moveMidPointsWithElement": false, "opacity": 100, "points": [ [ @@ -17861,8 +17576,8 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding 0, ], [ - 100, - 0, + 145, + "0.00725", ], ], "roughness": 1, @@ -17873,118 +17588,28 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding "startBinding": { "elementId": "id0", "fixedPoint": [ - 1, + "0.50010", "0.50010", ], - "focus": 0, - "gap": 0, + "mode": "orbit", }, "strokeColor": "#1e1e1e", "strokeStyle": "solid", "strokeWidth": 2, "type": "arrow", "updated": 1, - "version": 10, - "width": 100, - "x": 0, - "y": "0.01000", + "version": 7, + "width": 145, + "x": -50, + "y": 0, } `; exports[`history > singleplayer undo/redo > should support bidirectional bindings > should unbind rectangle from arrow on deletion and rebind on undo > [end of test] number of elements 1`] = `4`; -exports[`history > singleplayer undo/redo > should support bidirectional bindings > should unbind rectangle from arrow on deletion and rebind on undo > [end of test] number of renders 1`] = `14`; +exports[`history > singleplayer undo/redo > should support bidirectional bindings > should unbind rectangle from arrow on deletion and rebind on undo > [end of test] number of renders 1`] = `10`; -exports[`history > singleplayer undo/redo > should support bidirectional bindings > should unbind rectangle from arrow on deletion and rebind on undo > [end of test] redo stack 1`] = ` -[ - { - "appState": AppStateDelta { - "delta": Delta { - "deleted": { - "selectedElementIds": { - "id0": true, - }, - }, - "inserted": { - "selectedElementIds": {}, - }, - }, - }, - "elements": { - "added": {}, - "removed": { - "id0": { - "deleted": { - "isDeleted": false, - "version": 8, - }, - "inserted": { - "isDeleted": true, - "version": 5, - }, - }, - "id1": { - "deleted": { - "isDeleted": false, - "version": 8, - }, - "inserted": { - "isDeleted": true, - "version": 5, - }, - }, - }, - "updated": { - "id13": { - "deleted": { - "endBinding": { - "elementId": "id2", - "fixedPoint": [ - 0, - "0.50010", - ], - "focus": 0, - "gap": 0, - }, - "startBinding": { - "elementId": "id0", - "fixedPoint": [ - 1, - "0.50010", - ], - "focus": 0, - "gap": 0, - }, - "version": 10, - }, - "inserted": { - "endBinding": { - "elementId": "id2", - "fixedPoint": [ - 0, - "0.50010", - ], - "focus": 0, - "gap": 0, - }, - "startBinding": null, - "version": 7, - }, - }, - "id2": { - "deleted": { - "version": 5, - }, - "inserted": { - "version": 3, - }, - }, - }, - }, - "id": "id21", - }, -] -`; +exports[`history > singleplayer undo/redo > should support bidirectional bindings > should unbind rectangle from arrow on deletion and rebind on undo > [end of test] redo stack 1`] = `[]`; exports[`history > singleplayer undo/redo > should support bidirectional bindings > should unbind rectangle from arrow on deletion and rebind on undo > [end of test] undo stack 1`] = ` [ @@ -18234,16 +17859,15 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding "endBinding": { "elementId": "id2", "fixedPoint": [ - 0, + "0.50010", "0.50010", ], - "focus": 0, - "gap": 0, + "mode": "orbit", }, "fillStyle": "solid", "frameId": null, "groupIds": [], - "height": 0, + "height": "0.00725", "index": "a3", "isDeleted": false, "lastCommittedPoint": null, @@ -18256,8 +17880,8 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding 0, ], [ - 100, - 0, + 145, + "0.00725", ], ], "roughness": 1, @@ -18268,24 +17892,23 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding "startBinding": { "elementId": "id0", "fixedPoint": [ - 1, + "0.50010", "0.50010", ], - "focus": 0, - "gap": 0, + "mode": "orbit", }, "strokeColor": "#1e1e1e", "strokeStyle": "solid", "strokeWidth": 2, "type": "arrow", - "version": 6, - "width": 100, - "x": 0, + "version": 7, + "width": 145, + "x": -50, "y": 0, }, "inserted": { "isDeleted": true, - "version": 5, + "version": 6, }, }, }, @@ -18324,30 +17947,6 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding }, "id": "id15", }, - { - "appState": AppStateDelta { - "delta": Delta { - "deleted": { - "selectedElementIds": { - "id0": true, - }, - "selectedLinearElementId": null, - }, - "inserted": { - "selectedElementIds": { - "id13": true, - }, - "selectedLinearElementId": "id13", - }, - }, - }, - "elements": { - "added": {}, - "removed": {}, - "updated": {}, - }, - "id": "id18", - }, ] `; @@ -18362,7 +17961,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding "locked": false, "type": "selection", }, - "bindMode": "focus", + "bindMode": "orbit", "collaborators": Map {}, "contextMenu": null, "croppingElementId": null, @@ -18439,8 +18038,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding "scrollY": 0, "searchMatches": null, "selectedElementIds": { - "id0": true, - "id2": true, + "id13": true, }, "selectedElementsAreBeingDragged": false, "selectedGroupIds": {}, @@ -18473,14 +18071,14 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding "angle": 0, "backgroundColor": "transparent", "boundElements": [ - { - "id": "id13", - "type": "arrow", - }, { "id": "id1", "type": "text", }, + { + "id": "id13", + "type": "arrow", + }, ], "customData": undefined, "fillStyle": "solid", @@ -18500,7 +18098,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding "strokeWidth": 2, "type": "rectangle", "updated": 1, - "version": 8, + "version": 4, "width": 100, "x": -100, "y": -50, @@ -18538,7 +18136,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding "textAlign": "center", "type": "text", "updated": 1, - "version": 8, + "version": 4, "verticalAlign": "middle", "width": 30, "x": -65, @@ -18574,7 +18172,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding "strokeWidth": 2, "type": "rectangle", "updated": 1, - "version": 5, + "version": 3, "width": 100, "x": 100, "y": -50, @@ -18592,23 +18190,21 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding "endBinding": { "elementId": "id2", "fixedPoint": [ - 0, + "0.50010", "0.50010", ], - "focus": 0, - "gap": 0, + "mode": "orbit", }, "fillStyle": "solid", "frameId": null, "groupIds": [], - "height": 0, + "height": "0.00725", "id": "id13", "index": "a3", "isDeleted": false, "lastCommittedPoint": null, "link": null, "locked": false, - "moveMidPointsWithElement": false, "opacity": 100, "points": [ [ @@ -18616,8 +18212,8 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding 0, ], [ - 100, - 0, + 145, + "0.00725", ], ], "roughness": 1, @@ -18628,113 +18224,28 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding "startBinding": { "elementId": "id0", "fixedPoint": [ - 1, + "0.50010", "0.50010", ], - "focus": 0, - "gap": 0, + "mode": "orbit", }, "strokeColor": "#1e1e1e", "strokeStyle": "solid", "strokeWidth": 2, "type": "arrow", "updated": 1, - "version": 11, - "width": 100, - "x": 0, - "y": "0.01000", + "version": 7, + "width": 145, + "x": -50, + "y": 0, } `; exports[`history > singleplayer undo/redo > should support bidirectional bindings > should unbind rectangles from arrow on deletion and rebind on undo > [end of test] number of elements 1`] = `4`; -exports[`history > singleplayer undo/redo > should support bidirectional bindings > should unbind rectangles from arrow on deletion and rebind on undo > [end of test] number of renders 1`] = `15`; +exports[`history > singleplayer undo/redo > should support bidirectional bindings > should unbind rectangles from arrow on deletion and rebind on undo > [end of test] number of renders 1`] = `10`; -exports[`history > singleplayer undo/redo > should support bidirectional bindings > should unbind rectangles from arrow on deletion and rebind on undo > [end of test] redo stack 1`] = ` -[ - { - "appState": AppStateDelta { - "delta": Delta { - "deleted": { - "selectedElementIds": { - "id0": true, - "id2": true, - }, - }, - "inserted": { - "selectedElementIds": {}, - }, - }, - }, - "elements": { - "added": {}, - "removed": { - "id0": { - "deleted": { - "isDeleted": false, - "version": 8, - }, - "inserted": { - "isDeleted": true, - "version": 5, - }, - }, - "id1": { - "deleted": { - "isDeleted": false, - "version": 8, - }, - "inserted": { - "isDeleted": true, - "version": 5, - }, - }, - "id2": { - "deleted": { - "isDeleted": false, - "version": 5, - }, - "inserted": { - "isDeleted": true, - "version": 4, - }, - }, - }, - "updated": { - "id13": { - "deleted": { - "endBinding": { - "elementId": "id2", - "fixedPoint": [ - 0, - "0.50010", - ], - "focus": 0, - "gap": 0, - }, - "startBinding": { - "elementId": "id0", - "fixedPoint": [ - 1, - "0.50010", - ], - "focus": 0, - "gap": 0, - }, - "version": 11, - }, - "inserted": { - "endBinding": null, - "startBinding": null, - "version": 8, - }, - }, - }, - }, - "id": "id24", - }, -] -`; +exports[`history > singleplayer undo/redo > should support bidirectional bindings > should unbind rectangles from arrow on deletion and rebind on undo > [end of test] redo stack 1`] = `[]`; exports[`history > singleplayer undo/redo > should support bidirectional bindings > should unbind rectangles from arrow on deletion and rebind on undo > [end of test] undo stack 1`] = ` [ @@ -18984,16 +18495,15 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding "endBinding": { "elementId": "id2", "fixedPoint": [ - 0, + "0.50010", "0.50010", ], - "focus": 0, - "gap": 0, + "mode": "orbit", }, "fillStyle": "solid", "frameId": null, "groupIds": [], - "height": 0, + "height": "0.00725", "index": "a3", "isDeleted": false, "lastCommittedPoint": null, @@ -19006,8 +18516,8 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding 0, ], [ - 100, - 0, + 145, + "0.00725", ], ], "roughness": 1, @@ -19018,24 +18528,23 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding "startBinding": { "elementId": "id0", "fixedPoint": [ - 1, + "0.50010", "0.50010", ], - "focus": 0, - "gap": 0, + "mode": "orbit", }, "strokeColor": "#1e1e1e", "strokeStyle": "solid", "strokeWidth": 2, "type": "arrow", - "version": 6, - "width": 100, - "x": 0, + "version": 7, + "width": 145, + "x": -50, "y": 0, }, "inserted": { "isDeleted": true, - "version": 5, + "version": 6, }, }, }, @@ -19074,50 +18583,6 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding }, "id": "id15", }, - { - "appState": AppStateDelta { - "delta": Delta { - "deleted": { - "selectedElementIds": { - "id0": true, - }, - "selectedLinearElementId": null, - }, - "inserted": { - "selectedElementIds": { - "id13": true, - }, - "selectedLinearElementId": "id13", - }, - }, - }, - "elements": { - "added": {}, - "removed": {}, - "updated": {}, - }, - "id": "id18", - }, - { - "appState": AppStateDelta { - "delta": Delta { - "deleted": { - "selectedElementIds": { - "id2": true, - }, - }, - "inserted": { - "selectedElementIds": {}, - }, - }, - }, - "elements": { - "added": {}, - "removed": {}, - "updated": {}, - }, - "id": "id21", - }, ] `; @@ -19132,7 +18597,7 @@ exports[`history > singleplayer undo/redo > should support changes in elements' "locked": false, "type": "selection", }, - "bindMode": "focus", + "bindMode": "orbit", "collaborators": Map {}, "contextMenu": null, "croppingElementId": null, @@ -19612,7 +19077,7 @@ exports[`history > singleplayer undo/redo > should support duplication of groups "locked": false, "type": "selection", }, - "bindMode": "focus", + "bindMode": "orbit", "collaborators": Map {}, "contextMenu": null, "croppingElementId": null, @@ -20123,7 +19588,7 @@ exports[`history > singleplayer undo/redo > should support element creation, del "locked": false, "type": "selection", }, - "bindMode": "focus", + "bindMode": "orbit", "collaborators": Map {}, "contextMenu": null, "croppingElementId": null, @@ -20582,7 +20047,7 @@ exports[`history > singleplayer undo/redo > should support linear element creati "locked": false, "type": "selection", }, - "bindMode": "focus", + "bindMode": "orbit", "collaborators": Map {}, "contextMenu": null, "croppingElementId": null, diff --git a/packages/excalidraw/tests/__snapshots__/move.test.tsx.snap b/packages/excalidraw/tests/__snapshots__/move.test.tsx.snap index f360995a8e..556a41c35b 100644 --- a/packages/excalidraw/tests/__snapshots__/move.test.tsx.snap +++ b/packages/excalidraw/tests/__snapshots__/move.test.tsx.snap @@ -95,142 +95,3 @@ exports[`move element > rectangle 5`] = ` "y": 40, } `; - -exports[`move element > rectangles with binding arrow 5`] = ` -{ - "angle": 0, - "backgroundColor": "transparent", - "boundElements": [ - { - "id": "id6", - "type": "arrow", - }, - ], - "customData": undefined, - "fillStyle": "solid", - "frameId": null, - "groupIds": [], - "height": 100, - "id": "id0", - "index": "a0", - "isDeleted": false, - "link": null, - "locked": false, - "opacity": 100, - "roughness": 1, - "roundness": null, - "seed": 1278240551, - "strokeColor": "#1e1e1e", - "strokeStyle": "solid", - "strokeWidth": 2, - "type": "rectangle", - "updated": 1, - "version": 4, - "versionNonce": 1006504105, - "width": 100, - "x": 0, - "y": 0, -} -`; - -exports[`move element > rectangles with binding arrow 6`] = ` -{ - "angle": 0, - "backgroundColor": "transparent", - "boundElements": [ - { - "id": "id6", - "type": "arrow", - }, - ], - "customData": undefined, - "fillStyle": "solid", - "frameId": null, - "groupIds": [], - "height": 300, - "id": "id3", - "index": "a1", - "isDeleted": false, - "link": null, - "locked": false, - "opacity": 100, - "roughness": 1, - "roundness": null, - "seed": 1116226695, - "strokeColor": "#1e1e1e", - "strokeStyle": "solid", - "strokeWidth": 2, - "type": "rectangle", - "updated": 1, - "version": 7, - "versionNonce": 1984422985, - "width": 300, - "x": 201, - "y": 2, -} -`; - -exports[`move element > rectangles with binding arrow 7`] = ` -{ - "angle": 0, - "backgroundColor": "transparent", - "boundElements": null, - "customData": undefined, - "elbowed": false, - "endArrowhead": "arrow", - "endBinding": { - "elementId": "id3", - "fixedPoint": [ - "0.50000", - "0.50000", - ], - "mode": "outline", - }, - "fillStyle": "solid", - "frameId": null, - "groupIds": [], - "height": "102.02000", - "id": "id6", - "index": "a2", - "isDeleted": false, - "lastCommittedPoint": null, - "link": null, - "locked": false, - "moveMidPointsWithElement": false, - "opacity": 100, - "points": [ - [ - 0, - 0, - ], - [ - "301.02000", - "102.02000", - ], - ], - "roughness": 1, - "roundness": { - "type": 2, - }, - "seed": 23633383, - "startArrowhead": null, - "startBinding": { - "elementId": "id0", - "fixedPoint": [ - "0.50000", - "0.50000", - ], - "mode": "outline", - }, - "strokeColor": "#1e1e1e", - "strokeStyle": "solid", - "strokeWidth": 2, - "type": "arrow", - "updated": 1, - "version": 11, - "versionNonce": 1573789895, - "width": "301.02000", - "x": "50.01000", - "y": "50.01000", -} -`; diff --git a/packages/excalidraw/tests/__snapshots__/regressionTests.test.tsx.snap b/packages/excalidraw/tests/__snapshots__/regressionTests.test.tsx.snap index 17f3b7fcaa..7420c8ffb7 100644 --- a/packages/excalidraw/tests/__snapshots__/regressionTests.test.tsx.snap +++ b/packages/excalidraw/tests/__snapshots__/regressionTests.test.tsx.snap @@ -11,7 +11,7 @@ exports[`given element A and group of elements B and given both are selected whe "locked": false, "type": "selection", }, - "bindMode": "focus", + "bindMode": "orbit", "collaborators": Map {}, "contextMenu": null, "croppingElementId": null, @@ -437,7 +437,7 @@ exports[`given element A and group of elements B and given both are selected whe "locked": false, "type": "selection", }, - "bindMode": "focus", + "bindMode": "orbit", "collaborators": Map {}, "contextMenu": null, "croppingElementId": null, @@ -853,7 +853,7 @@ exports[`regression tests > Cmd/Ctrl-click exclusively select element under poin "locked": false, "type": "selection", }, - "bindMode": "focus", + "bindMode": "orbit", "collaborators": Map {}, "contextMenu": null, "croppingElementId": null, @@ -1419,7 +1419,7 @@ exports[`regression tests > Drags selected element when hitting only bounding bo "locked": false, "type": "selection", }, - "bindMode": "focus", + "bindMode": "orbit", "collaborators": Map {}, "contextMenu": null, "croppingElementId": null, @@ -1626,7 +1626,7 @@ exports[`regression tests > adjusts z order when grouping > [end of test] appSta "locked": false, "type": "selection", }, - "bindMode": "focus", + "bindMode": "orbit", "collaborators": Map {}, "contextMenu": null, "croppingElementId": null, @@ -2010,7 +2010,7 @@ exports[`regression tests > alt-drag duplicates an element > [end of test] appSt "locked": false, "type": "selection", }, - "bindMode": "focus", + "bindMode": "orbit", "collaborators": Map {}, "contextMenu": null, "croppingElementId": null, @@ -2255,7 +2255,7 @@ exports[`regression tests > arrow keys > [end of test] appState 1`] = ` "locked": false, "type": "selection", }, - "bindMode": "focus", + "bindMode": "orbit", "collaborators": Map {}, "contextMenu": null, "croppingElementId": null, @@ -2435,7 +2435,7 @@ exports[`regression tests > can drag element that covers another element, while "locked": false, "type": "selection", }, - "bindMode": "focus", + "bindMode": "orbit", "collaborators": Map {}, "contextMenu": null, "croppingElementId": null, @@ -2760,7 +2760,7 @@ exports[`regression tests > change the properties of a shape > [end of test] app "locked": false, "type": "selection", }, - "bindMode": "focus", + "bindMode": "orbit", "collaborators": Map {}, "contextMenu": null, "croppingElementId": null, @@ -3015,7 +3015,7 @@ exports[`regression tests > click on an element and drag it > [dragged] appState "locked": false, "type": "selection", }, - "bindMode": "focus", + "bindMode": "orbit", "collaborators": Map {}, "contextMenu": null, "croppingElementId": null, @@ -3256,7 +3256,7 @@ exports[`regression tests > click on an element and drag it > [end of test] appS "locked": false, "type": "selection", }, - "bindMode": "focus", + "bindMode": "orbit", "collaborators": Map {}, "contextMenu": null, "croppingElementId": null, @@ -3492,7 +3492,7 @@ exports[`regression tests > click to select a shape > [end of test] appState 1`] "locked": false, "type": "selection", }, - "bindMode": "focus", + "bindMode": "orbit", "collaborators": Map {}, "contextMenu": null, "croppingElementId": null, @@ -3750,7 +3750,7 @@ exports[`regression tests > click-drag to select a group > [end of test] appStat "locked": false, "type": "selection", }, - "bindMode": "focus", + "bindMode": "orbit", "collaborators": Map {}, "contextMenu": null, "croppingElementId": null, @@ -4064,7 +4064,7 @@ exports[`regression tests > deleting last but one element in editing group shoul "locked": false, "type": "selection", }, - "bindMode": "focus", + "bindMode": "orbit", "collaborators": Map {}, "contextMenu": null, "croppingElementId": null, @@ -4500,7 +4500,7 @@ exports[`regression tests > deselects group of selected elements on pointer down "locked": false, "type": "selection", }, - "bindMode": "focus", + "bindMode": "orbit", "collaborators": Map {}, "contextMenu": null, "croppingElementId": null, @@ -4783,7 +4783,7 @@ exports[`regression tests > deselects group of selected elements on pointer up w "locked": false, "type": "selection", }, - "bindMode": "focus", + "bindMode": "orbit", "collaborators": Map {}, "contextMenu": null, "croppingElementId": null, @@ -5059,7 +5059,7 @@ exports[`regression tests > deselects selected element on pointer down when poin "locked": false, "type": "selection", }, - "bindMode": "focus", + "bindMode": "orbit", "collaborators": Map {}, "contextMenu": null, "croppingElementId": null, @@ -5267,7 +5267,7 @@ exports[`regression tests > deselects selected element, on pointer up, when clic "locked": false, "type": "selection", }, - "bindMode": "focus", + "bindMode": "orbit", "collaborators": Map {}, "contextMenu": null, "croppingElementId": null, @@ -5467,7 +5467,7 @@ exports[`regression tests > double click to edit a group > [end of test] appStat "locked": false, "type": "selection", }, - "bindMode": "focus", + "bindMode": "orbit", "collaborators": Map {}, "contextMenu": null, "croppingElementId": null, @@ -5860,7 +5860,7 @@ exports[`regression tests > drags selected elements from point inside common bou "locked": false, "type": "selection", }, - "bindMode": "focus", + "bindMode": "orbit", "collaborators": Map {}, "contextMenu": null, "croppingElementId": null, @@ -6157,7 +6157,7 @@ exports[`regression tests > draw every type of shape > [end of test] appState 1` "locked": false, "type": "freedraw", }, - "bindMode": "focus", + "bindMode": "orbit", "collaborators": Map {}, "contextMenu": null, "croppingElementId": null, @@ -6993,7 +6993,7 @@ exports[`regression tests > given a group of selected elements with an element t "locked": false, "type": "selection", }, - "bindMode": "focus", + "bindMode": "orbit", "collaborators": Map {}, "contextMenu": null, "croppingElementId": null, @@ -7327,7 +7327,7 @@ exports[`regression tests > given a selected element A and a not selected elemen "locked": false, "type": "selection", }, - "bindMode": "focus", + "bindMode": "orbit", "collaborators": Map {}, "contextMenu": null, "croppingElementId": null, @@ -7606,7 +7606,7 @@ exports[`regression tests > given selected element A with lower z-index than uns "locked": false, "type": "selection", }, - "bindMode": "focus", + "bindMode": "orbit", "collaborators": Map {}, "contextMenu": null, "croppingElementId": null, @@ -7841,7 +7841,7 @@ exports[`regression tests > given selected element A with lower z-index than uns "locked": false, "type": "selection", }, - "bindMode": "focus", + "bindMode": "orbit", "collaborators": Map {}, "contextMenu": null, "croppingElementId": null, @@ -8081,7 +8081,7 @@ exports[`regression tests > key 2 selects rectangle tool > [end of test] appStat "locked": false, "type": "selection", }, - "bindMode": "focus", + "bindMode": "orbit", "collaborators": Map {}, "contextMenu": null, "croppingElementId": null, @@ -8261,7 +8261,7 @@ exports[`regression tests > key 3 selects diamond tool > [end of test] appState "locked": false, "type": "selection", }, - "bindMode": "focus", + "bindMode": "orbit", "collaborators": Map {}, "contextMenu": null, "croppingElementId": null, @@ -8441,7 +8441,7 @@ exports[`regression tests > key 4 selects ellipse tool > [end of test] appState "locked": false, "type": "selection", }, - "bindMode": "focus", + "bindMode": "orbit", "collaborators": Map {}, "contextMenu": null, "croppingElementId": null, @@ -8621,7 +8621,7 @@ exports[`regression tests > key 5 selects arrow tool > [end of test] appState 1` "locked": false, "type": "selection", }, - "bindMode": "focus", + "bindMode": "orbit", "collaborators": Map {}, "contextMenu": null, "croppingElementId": null, @@ -8706,7 +8706,6 @@ exports[`regression tests > key 5 selects arrow tool > [end of test] appState 1` "customLineAngle": null, "elbowed": false, "elementId": "id0", - "endBindingElement": "keep", "hoverPointIndex": -1, "isDragging": false, "lastUncommittedPoint": null, @@ -8727,7 +8726,6 @@ exports[`regression tests > key 5 selects arrow tool > [end of test] appState 1` }, "segmentMidPointHoveredCoords": null, "selectedPointsIndices": null, - "startBindingElement": "keep", }, "selectionElement": null, "shouldCacheIgnoreZoom": false, @@ -8847,7 +8845,7 @@ exports[`regression tests > key 6 selects line tool > [end of test] appState 1`] "locked": false, "type": "selection", }, - "bindMode": "focus", + "bindMode": "orbit", "collaborators": Map {}, "contextMenu": null, "croppingElementId": null, @@ -8932,7 +8930,6 @@ exports[`regression tests > key 6 selects line tool > [end of test] appState 1`] "customLineAngle": null, "elbowed": false, "elementId": "id0", - "endBindingElement": "keep", "hoverPointIndex": -1, "isDragging": false, "lastUncommittedPoint": null, @@ -8953,7 +8950,6 @@ exports[`regression tests > key 6 selects line tool > [end of test] appState 1`] }, "segmentMidPointHoveredCoords": null, "selectedPointsIndices": null, - "startBindingElement": "keep", }, "selectionElement": null, "shouldCacheIgnoreZoom": false, @@ -9071,7 +9067,7 @@ exports[`regression tests > key 7 selects freedraw tool > [end of test] appState "locked": false, "type": "freedraw", }, - "bindMode": "focus", + "bindMode": "orbit", "collaborators": Map {}, "contextMenu": null, "croppingElementId": null, @@ -9267,7 +9263,7 @@ exports[`regression tests > key a selects arrow tool > [end of test] appState 1` "locked": false, "type": "selection", }, - "bindMode": "focus", + "bindMode": "orbit", "collaborators": Map {}, "contextMenu": null, "croppingElementId": null, @@ -9352,7 +9348,6 @@ exports[`regression tests > key a selects arrow tool > [end of test] appState 1` "customLineAngle": null, "elbowed": false, "elementId": "id0", - "endBindingElement": "keep", "hoverPointIndex": -1, "isDragging": false, "lastUncommittedPoint": null, @@ -9373,7 +9368,6 @@ exports[`regression tests > key a selects arrow tool > [end of test] appState 1` }, "segmentMidPointHoveredCoords": null, "selectedPointsIndices": null, - "startBindingElement": "keep", }, "selectionElement": null, "shouldCacheIgnoreZoom": false, @@ -9493,7 +9487,7 @@ exports[`regression tests > key d selects diamond tool > [end of test] appState "locked": false, "type": "selection", }, - "bindMode": "focus", + "bindMode": "orbit", "collaborators": Map {}, "contextMenu": null, "croppingElementId": null, @@ -9673,7 +9667,7 @@ exports[`regression tests > key l selects line tool > [end of test] appState 1`] "locked": false, "type": "selection", }, - "bindMode": "focus", + "bindMode": "orbit", "collaborators": Map {}, "contextMenu": null, "croppingElementId": null, @@ -9758,7 +9752,6 @@ exports[`regression tests > key l selects line tool > [end of test] appState 1`] "customLineAngle": null, "elbowed": false, "elementId": "id0", - "endBindingElement": "keep", "hoverPointIndex": -1, "isDragging": false, "lastUncommittedPoint": null, @@ -9779,7 +9772,6 @@ exports[`regression tests > key l selects line tool > [end of test] appState 1`] }, "segmentMidPointHoveredCoords": null, "selectedPointsIndices": null, - "startBindingElement": "keep", }, "selectionElement": null, "shouldCacheIgnoreZoom": false, @@ -9897,7 +9889,7 @@ exports[`regression tests > key o selects ellipse tool > [end of test] appState "locked": false, "type": "selection", }, - "bindMode": "focus", + "bindMode": "orbit", "collaborators": Map {}, "contextMenu": null, "croppingElementId": null, @@ -10077,7 +10069,7 @@ exports[`regression tests > key p selects freedraw tool > [end of test] appState "locked": false, "type": "freedraw", }, - "bindMode": "focus", + "bindMode": "orbit", "collaborators": Map {}, "contextMenu": null, "croppingElementId": null, @@ -10273,7 +10265,7 @@ exports[`regression tests > key r selects rectangle tool > [end of test] appStat "locked": false, "type": "selection", }, - "bindMode": "focus", + "bindMode": "orbit", "collaborators": Map {}, "contextMenu": null, "croppingElementId": null, @@ -10453,7 +10445,7 @@ exports[`regression tests > make a group and duplicate it > [end of test] appSta "locked": false, "type": "selection", }, - "bindMode": "focus", + "bindMode": "orbit", "collaborators": Map {}, "contextMenu": null, "croppingElementId": null, @@ -10984,7 +10976,7 @@ exports[`regression tests > noop interaction after undo shouldn't create history "locked": false, "type": "selection", }, - "bindMode": "focus", + "bindMode": "orbit", "collaborators": Map {}, "contextMenu": null, "croppingElementId": null, @@ -11264,7 +11256,7 @@ exports[`regression tests > pinch-to-zoom works > [end of test] appState 1`] = ` "locked": false, "type": "selection", }, - "bindMode": "focus", + "bindMode": "orbit", "collaborators": Map {}, "contextMenu": null, "croppingElementId": null, @@ -11387,7 +11379,7 @@ exports[`regression tests > shift click on selected element should deselect it o "locked": false, "type": "selection", }, - "bindMode": "focus", + "bindMode": "orbit", "collaborators": Map {}, "contextMenu": null, "croppingElementId": null, @@ -11587,7 +11579,7 @@ exports[`regression tests > shift-click to multiselect, then drag > [end of test "locked": false, "type": "selection", }, - "bindMode": "focus", + "bindMode": "orbit", "collaborators": Map {}, "contextMenu": null, "croppingElementId": null, @@ -11906,7 +11898,7 @@ exports[`regression tests > should group elements and ungroup them > [end of tes "locked": false, "type": "selection", }, - "bindMode": "focus", + "bindMode": "orbit", "collaborators": Map {}, "contextMenu": null, "croppingElementId": null, @@ -12335,7 +12327,7 @@ exports[`regression tests > single-clicking on a subgroup of a selected group sh "locked": false, "type": "selection", }, - "bindMode": "focus", + "bindMode": "orbit", "collaborators": Map {}, "contextMenu": null, "croppingElementId": null, @@ -12975,7 +12967,7 @@ exports[`regression tests > spacebar + drag scrolls the canvas > [end of test] a "locked": false, "type": "selection", }, - "bindMode": "focus", + "bindMode": "orbit", "collaborators": Map {}, "contextMenu": null, "croppingElementId": null, @@ -13101,7 +13093,7 @@ exports[`regression tests > supports nested groups > [end of test] appState 1`] "locked": false, "type": "selection", }, - "bindMode": "focus", + "bindMode": "orbit", "collaborators": Map {}, "contextMenu": null, "croppingElementId": null, @@ -13732,7 +13724,7 @@ exports[`regression tests > switches from group of selected elements to another "locked": false, "type": "selection", }, - "bindMode": "focus", + "bindMode": "orbit", "collaborators": Map {}, "contextMenu": null, "croppingElementId": null, @@ -14071,7 +14063,7 @@ exports[`regression tests > switches selected element on pointer down > [end of "locked": false, "type": "selection", }, - "bindMode": "focus", + "bindMode": "orbit", "collaborators": Map {}, "contextMenu": null, "croppingElementId": null, @@ -14335,7 +14327,7 @@ exports[`regression tests > two-finger scroll works > [end of test] appState 1`] "locked": false, "type": "selection", }, - "bindMode": "focus", + "bindMode": "orbit", "collaborators": Map {}, "contextMenu": null, "croppingElementId": null, @@ -14458,7 +14450,7 @@ exports[`regression tests > undo/redo drawing an element > [end of test] appStat "locked": false, "type": "selection", }, - "bindMode": "focus", + "bindMode": "orbit", "collaborators": Map {}, "contextMenu": null, "croppingElementId": null, @@ -14851,7 +14843,7 @@ exports[`regression tests > updates fontSize & fontFamily appState > [end of tes "locked": false, "type": "text", }, - "bindMode": "focus", + "bindMode": "orbit", "collaborators": Map {}, "contextMenu": null, "croppingElementId": null, @@ -14974,7 +14966,7 @@ exports[`regression tests > zoom hotkeys > [end of test] appState 1`] = ` "locked": false, "type": "selection", }, - "bindMode": "focus", + "bindMode": "orbit", "collaborators": Map {}, "contextMenu": null, "croppingElementId": null, diff --git a/packages/utils/tests/__snapshots__/export.test.ts.snap b/packages/utils/tests/__snapshots__/export.test.ts.snap index b61577f02b..43c68604ce 100644 --- a/packages/utils/tests/__snapshots__/export.test.ts.snap +++ b/packages/utils/tests/__snapshots__/export.test.ts.snap @@ -11,7 +11,7 @@ exports[`exportToSvg > with default arguments 1`] = ` "locked": false, "type": "selection", }, - "bindMode": "focus", + "bindMode": "orbit", "collaborators": Map {}, "contextMenu": null, "croppingElementId": null,