From 55f71d18d631e753d453968063dc421ea7115a02 Mon Sep 17 00:00:00 2001 From: sorenjohanson Date: Fri, 13 Sep 2024 08:45:22 +0000 Subject: [PATCH] fix: tests --- .../__snapshots__/contextmenu.test.tsx.snap | 11918 ++++------------ .../tests/__snapshots__/history.test.tsx.snap | 6351 +++----- 2 files changed, 4585 insertions(+), 13684 deletions(-) diff --git a/packages/excalidraw/tests/__snapshots__/contextmenu.test.tsx.snap b/packages/excalidraw/tests/__snapshots__/contextmenu.test.tsx.snap index 426ed8fb961e..168abcae0915 100644 --- a/packages/excalidraw/tests/__snapshots__/contextmenu.test.tsx.snap +++ b/packages/excalidraw/tests/__snapshots__/contextmenu.test.tsx.snap @@ -1000,7648 +1000,224 @@ exports[`contextMenu element > selecting 'Add to library' in context menu adds e "type": "selection", }, "collaborators": Map {}, - "contextMenu": { - "items": [ - "separator", - { - "icon": , - "keyTest": [Function], - "label": "labels.cut", - "name": "cut", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "icon": , - "keyTest": undefined, - "label": "labels.copy", - "name": "copy", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "keyTest": undefined, - "label": "labels.paste", - "name": "paste", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "label": "labels.selectAllElementsInFrame", - "name": "selectAllElementsInFrame", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "canvas", - }, - }, - { - "label": "labels.removeAllElementsFromFrame", - "name": "removeAllElementsFromFrame", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "history", - }, - }, - "separator", - { - "icon": , - "keyTest": [Function], - "keywords": [ - "png", - "clipboard", - "copy", - ], - "label": "labels.copyAsPng", - "name": "copyAsPng", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "icon": , - "keywords": [ - "svg", - "clipboard", - "copy", - ], - "label": "labels.copyAsSvg", - "name": "copyAsSvg", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "keywords": [ - "text", - "clipboard", - "copy", - ], - "label": "labels.copyText", - "name": "copyText", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", - }, - }, - "separator", - { - "icon": , - "keyTest": [Function], - "label": "labels.copyStyles", - "name": "copyStyles", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "icon": , - "keyTest": [Function], - "label": "labels.pasteStyles", - "name": "pasteStyles", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - "separator", - { - "PanelComponent": [Function], - "icon": [Function], - "keyTest": [Function], - "label": "labels.group", - "name": "group", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "icon": null, - "label": "labels.autoResize", - "name": "autoResize", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "label": "labels.unbindText", - "name": "unbindText", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "label": "labels.bindText", - "name": "bindText", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "label": "labels.createContainerFromText", - "name": "wrapTextInContainer", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "PanelComponent": [Function], - "icon": [Function], - "keyTest": [Function], - "label": "labels.ungroup", - "name": "ungroup", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", - }, - }, - "separator", - { - "label": "labels.addToLibrary", - "name": "addToLibrary", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - "separator", - { - "PanelComponent": [Function], - "icon": , - "keyPriority": 40, - "keyTest": [Function], - "keywords": [ - "move down", - "zindex", - "layer", - ], - "label": "labels.sendBackward", - "name": "sendBackward", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "PanelComponent": [Function], - "icon": , - "keyPriority": 40, - "keyTest": [Function], - "keywords": [ - "move up", - "zindex", - "layer", - ], - "label": "labels.bringForward", - "name": "bringForward", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "PanelComponent": [Function], - "icon": , - "keyTest": [Function], - "keywords": [ - "move down", - "zindex", - "layer", - ], - "label": "labels.sendToBack", - "name": "sendToBack", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "PanelComponent": [Function], - "icon": , - "keyTest": [Function], - "keywords": [ - "move up", - "zindex", - "layer", - ], - "label": "labels.bringToFront", - "name": "bringToFront", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - "separator", - { - "icon": , - "keyTest": [Function], - "label": "labels.flipHorizontal", - "name": "flipHorizontal", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "icon": , - "keyTest": [Function], - "label": "labels.flipVertical", - "name": "flipVertical", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - "separator", - { - "PanelComponent": [Function], - "category": "Elements", - "keywords": [ - "line", - ], - "label": [Function], - "name": "toggleLinearEditor", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "PanelComponent": [Function], - "icon": , - "keyTest": [Function], - "label": [Function], - "name": "hyperlink", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "action": "click", - "category": "hyperlink", - }, - }, - { - "PanelComponent": [Function], - "icon": , - "keyTest": [Function], - "label": "labels.duplicateSelection", - "name": "duplicateSelection", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "icon": [Function], - "keyTest": [Function], - "label": [Function], - "name": "toggleElementLock", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", - }, - }, - "separator", - { - "PanelComponent": [Function], - "icon": , - "keyTest": [Function], - "label": "labels.delete", - "name": "deleteSelectedElements", - "perform": [Function], - "trackEvent": { - "action": "delete", - "category": "element", - }, - }, - ], - "left": -17, - "top": -7, - }, - "currentChartType": "bar", - "currentHoveredFontFamily": null, - "currentItemArrowType": "round", - "currentItemBackgroundColor": "transparent", - "currentItemEndArrowhead": "arrow", - "currentItemFillStyle": "solid", - "currentItemFontFamily": 5, - "currentItemFontSize": 20, - "currentItemOpacity": 100, - "currentItemRoughness": 1, - "currentItemRoundness": "round", - "currentItemStartArrowhead": null, - "currentItemStrokeColor": "#1e1e1e", - "currentItemStrokeStyle": "solid", - "currentItemStrokeWidth": 2, - "currentItemTextAlign": "left", - "cursorButton": "up", - "defaultSidebarDockedPreference": false, - "editingElement": null, - "editingFrame": null, - "editingGroupId": null, - "editingLinearElement": null, - "elementsToHighlight": null, - "errorMessage": null, - "exportBackground": true, - "exportEmbedScene": false, - "exportScale": 1, - "exportWithDarkMode": false, - "featureFlagLibraryButton": false, - "featureFlagWelcomeScreen": false, - "fileHandle": null, - "followedBy": Set {}, - "frameRendering": { - "clip": true, - "enabled": true, - "name": true, - "outline": true, - }, - "frameToHighlight": null, - "gridModeEnabled": false, - "gridSize": 20, - "gridStep": 5, - "height": 100, - "isBindingEnabled": true, - "isLoading": false, - "isResizing": false, - "isRotating": false, - "lastPointerDownWith": "mouse", - "multiElement": null, - "name": "Unbenannt-201933152653", - "newElement": null, - "objectsSnapModeEnabled": false, - "offsetLeft": 20, - "offsetTop": 10, - "openDialog": null, - "openMenu": null, - "openPopup": null, - "openSidebar": null, - "originSnapOffset": null, - "pasteDialog": { - "data": null, - "shown": false, - }, - "penDetected": false, - "penMode": false, - "pendingImageElementId": null, - "previousSelectedElementIds": {}, - "resizingElement": null, - "scrollX": 0, - "scrollY": 0, - "scrolledOutside": false, - "selectedElementIds": { - "id0": true, - }, - "selectedElementsAreBeingDragged": false, - "selectedGroupIds": {}, - "selectedLinearElement": null, - "selectionElement": null, - "shouldCacheIgnoreZoom": false, - "showHyperlinkPopup": false, - "showWelcomeScreen": true, - "snapLines": [], - "startBoundElement": null, - "stats": { - "open": false, - "panels": 3, - }, - "suggestedBindings": [], - "theme": "light", - "toast": null, - "userToFollow": null, - "viewBackgroundColor": "#ffffff", - "viewModeEnabled": false, - "width": 200, - "zenModeEnabled": false, - "zoom": { - "value": 1, - }, -} -`; - -exports[`contextMenu element > selecting 'Add to library' in context menu adds element to library > [end of test] element 0 1`] = ` -{ - "angle": 0, - "backgroundColor": "transparent", - "boundElements": null, - "customData": undefined, - "fillStyle": "solid", - "frameId": null, - "groupIds": [], - "height": 20, - "id": "id0", - "index": "a0", - "isDeleted": false, - "link": null, - "locked": false, - "opacity": 100, - "roughness": 1, - "roundness": { - "type": 3, - }, - "seed": 449462985, - "strokeColor": "#1e1e1e", - "strokeStyle": "solid", - "strokeWidth": 2, - "type": "rectangle", - "updated": 1, - "version": 3, - "versionNonce": 1150084233, - "width": 20, - "x": -10, - "y": 0, -} -`; - -exports[`contextMenu element > selecting 'Add to library' in context menu adds element to library > [end of test] history 1`] = ` -History { - "onHistoryChangedEmitter": Emitter { - "subscribers": [ - [Function], - [Function], - ], - }, - "redoStack": [], - "undoStack": [ - HistoryEntry { - "appStateChange": AppStateChange { - "delta": Delta { - "deleted": { - "selectedElementIds": { - "id0": true, - }, - }, - "inserted": { - "selectedElementIds": {}, - }, - }, - }, - "elementsChange": ElementsChange { - "added": Map {}, - "removed": Map { - "id0" => Delta { - "deleted": { - "angle": 0, - "backgroundColor": "transparent", - "boundElements": null, - "customData": undefined, - "fillStyle": "solid", - "frameId": null, - "groupIds": [], - "height": 20, - "index": "a0", - "isDeleted": false, - "link": null, - "locked": false, - "opacity": 100, - "roughness": 1, - "roundness": { - "type": 3, - }, - "strokeColor": "#1e1e1e", - "strokeStyle": "solid", - "strokeWidth": 2, - "type": "rectangle", - "width": 20, - "x": -10, - "y": 0, - }, - "inserted": { - "isDeleted": true, - }, - }, - }, - "updated": Map {}, - }, - }, - ], -} -`; - -exports[`contextMenu element > selecting 'Add to library' in context menu adds element to library > [end of test] number of elements 1`] = `1`; - -exports[`contextMenu element > selecting 'Add to library' in context menu adds element to library > [end of test] number of renders 1`] = `6`; - -exports[`contextMenu element > selecting 'Bring forward' in context menu brings element forward > [end of test] appState 1`] = ` -{ - "activeEmbeddable": null, - "activeTool": { - "customType": null, - "lastActiveTool": null, - "locked": false, - "type": "selection", - }, - "collaborators": Map {}, - "contextMenu": { - "items": [ - "separator", - { - "icon": , - "keyTest": [Function], - "label": "labels.cut", - "name": "cut", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "icon": , - "keyTest": undefined, - "label": "labels.copy", - "name": "copy", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "keyTest": undefined, - "label": "labels.paste", - "name": "paste", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "label": "labels.selectAllElementsInFrame", - "name": "selectAllElementsInFrame", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "canvas", - }, - }, - { - "label": "labels.removeAllElementsFromFrame", - "name": "removeAllElementsFromFrame", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "history", - }, - }, - "separator", - { - "icon": , - "keyTest": [Function], - "keywords": [ - "png", - "clipboard", - "copy", - ], - "label": "labels.copyAsPng", - "name": "copyAsPng", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "icon": , - "keywords": [ - "svg", - "clipboard", - "copy", - ], - "label": "labels.copyAsSvg", - "name": "copyAsSvg", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "keywords": [ - "text", - "clipboard", - "copy", - ], - "label": "labels.copyText", - "name": "copyText", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", - }, - }, - "separator", - { - "icon": , - "keyTest": [Function], - "label": "labels.copyStyles", - "name": "copyStyles", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "icon": , - "keyTest": [Function], - "label": "labels.pasteStyles", - "name": "pasteStyles", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - "separator", - { - "PanelComponent": [Function], - "icon": [Function], - "keyTest": [Function], - "label": "labels.group", - "name": "group", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "icon": null, - "label": "labels.autoResize", - "name": "autoResize", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "label": "labels.unbindText", - "name": "unbindText", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "label": "labels.bindText", - "name": "bindText", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "label": "labels.createContainerFromText", - "name": "wrapTextInContainer", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "PanelComponent": [Function], - "icon": [Function], - "keyTest": [Function], - "label": "labels.ungroup", - "name": "ungroup", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", - }, - }, - "separator", - { - "label": "labels.addToLibrary", - "name": "addToLibrary", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - "separator", - { - "PanelComponent": [Function], - "icon": , - "keyPriority": 40, - "keyTest": [Function], - "keywords": [ - "move down", - "zindex", - "layer", - ], - "label": "labels.sendBackward", - "name": "sendBackward", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "PanelComponent": [Function], - "icon": , - "keyPriority": 40, - "keyTest": [Function], - "keywords": [ - "move up", - "zindex", - "layer", - ], - "label": "labels.bringForward", - "name": "bringForward", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "PanelComponent": [Function], - "icon": , - "keyTest": [Function], - "keywords": [ - "move down", - "zindex", - "layer", - ], - "label": "labels.sendToBack", - "name": "sendToBack", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "PanelComponent": [Function], - "icon": , - "keyTest": [Function], - "keywords": [ - "move up", - "zindex", - "layer", - ], - "label": "labels.bringToFront", - "name": "bringToFront", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - "separator", - { - "icon": , - "keyTest": [Function], - "label": "labels.flipHorizontal", - "name": "flipHorizontal", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "icon": , - "keyTest": [Function], - "label": "labels.flipVertical", - "name": "flipVertical", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - "separator", - { - "PanelComponent": [Function], - "category": "Elements", - "keywords": [ - "line", - ], - "label": [Function], - "name": "toggleLinearEditor", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "PanelComponent": [Function], - "icon": , - "keyTest": [Function], - "label": [Function], - "name": "hyperlink", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "action": "click", - "category": "hyperlink", - }, - }, - { - "PanelComponent": [Function], - "icon": , - "keyTest": [Function], - "label": "labels.duplicateSelection", - "name": "duplicateSelection", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "icon": [Function], - "keyTest": [Function], - "label": [Function], - "name": "toggleElementLock", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", - }, - }, - "separator", - { - "PanelComponent": [Function], - "icon": , - "keyTest": [Function], - "label": "labels.delete", - "name": "deleteSelectedElements", - "perform": [Function], - "trackEvent": { - "action": "delete", - "category": "element", - }, - }, - ], - "left": -10, - "top": 0, - }, - "currentChartType": "bar", - "currentHoveredFontFamily": null, - "currentItemArrowType": "round", - "currentItemBackgroundColor": "transparent", - "currentItemEndArrowhead": "arrow", - "currentItemFillStyle": "solid", - "currentItemFontFamily": 5, - "currentItemFontSize": 20, - "currentItemOpacity": 100, - "currentItemRoughness": 1, - "currentItemRoundness": "round", - "currentItemStartArrowhead": null, - "currentItemStrokeColor": "#1e1e1e", - "currentItemStrokeStyle": "solid", - "currentItemStrokeWidth": 2, - "currentItemTextAlign": "left", - "cursorButton": "up", - "defaultSidebarDockedPreference": false, - "editingElement": null, - "editingFrame": null, - "editingGroupId": null, - "editingLinearElement": null, - "elementsToHighlight": null, - "errorMessage": null, - "exportBackground": true, - "exportEmbedScene": false, - "exportScale": 1, - "exportWithDarkMode": false, - "featureFlagLibraryButton": false, - "featureFlagWelcomeScreen": false, - "fileHandle": null, - "followedBy": Set {}, - "frameRendering": { - "clip": true, - "enabled": true, - "name": true, - "outline": true, - }, - "frameToHighlight": null, - "gridModeEnabled": false, - "gridSize": 20, - "gridStep": 5, - "height": 100, - "isBindingEnabled": true, - "isLoading": false, - "isResizing": false, - "isRotating": false, - "lastPointerDownWith": "mouse", - "multiElement": null, - "name": "Unbenannt-201933152653", - "newElement": null, - "objectsSnapModeEnabled": false, - "offsetLeft": 20, - "offsetTop": 10, - "openDialog": null, - "openMenu": null, - "openPopup": null, - "openSidebar": null, - "originSnapOffset": null, - "pasteDialog": { - "data": null, - "shown": false, - }, - "penDetected": false, - "penMode": false, - "pendingImageElementId": null, - "previousSelectedElementIds": {}, - "resizingElement": null, - "scrollX": 0, - "scrollY": 0, - "scrolledOutside": false, - "selectedElementIds": { - "id0": true, - }, - "selectedElementsAreBeingDragged": false, - "selectedGroupIds": {}, - "selectedLinearElement": null, - "selectionElement": null, - "shouldCacheIgnoreZoom": false, - "showHyperlinkPopup": false, - "showWelcomeScreen": true, - "snapLines": [], - "startBoundElement": null, - "stats": { - "open": false, - "panels": 3, - }, - "suggestedBindings": [], - "theme": "light", - "toast": null, - "userToFollow": null, - "viewBackgroundColor": "#ffffff", - "viewModeEnabled": false, - "width": 200, - "zenModeEnabled": false, - "zoom": { - "value": 1, - }, -} -`; - -exports[`contextMenu element > selecting 'Bring forward' in context menu brings element forward > [end of test] element 0 1`] = ` -{ - "angle": 0, - "backgroundColor": "transparent", - "boundElements": null, - "customData": undefined, - "fillStyle": "solid", - "frameId": null, - "groupIds": [], - "height": 20, - "id": "id0", - "index": "a0", - "isDeleted": false, - "link": null, - "locked": false, - "opacity": 100, - "roughness": 1, - "roundness": { - "type": 3, - }, - "seed": 449462985, - "strokeColor": "#1e1e1e", - "strokeStyle": "solid", - "strokeWidth": 2, - "type": "rectangle", - "updated": 1, - "version": 3, - "versionNonce": 1150084233, - "width": 20, - "x": -10, - "y": 0, -} -`; - -exports[`contextMenu element > selecting 'Bring forward' in context menu brings element forward > [end of test] element 1 1`] = ` -{ - "angle": 0, - "backgroundColor": "transparent", - "boundElements": null, - "customData": undefined, - "fillStyle": "solid", - "frameId": null, - "groupIds": [], - "height": 20, - "id": "id1", - "index": "a1", - "isDeleted": false, - "link": null, - "locked": false, - "opacity": 100, - "roughness": 1, - "roundness": { - "type": 3, - }, - "seed": 1014066025, - "strokeColor": "#1e1e1e", - "strokeStyle": "solid", - "strokeWidth": 2, - "type": "rectangle", - "updated": 1, - "version": 3, - "versionNonce": 1604849351, - "width": 20, - "x": 20, - "y": 30, -} -`; - -exports[`contextMenu element > selecting 'Bring forward' in context menu brings element forward > [end of test] history 1`] = ` -History { - "onHistoryChangedEmitter": Emitter { - "subscribers": [ - [Function], - [Function], - ], - }, - "redoStack": [], - "undoStack": [ - HistoryEntry { - "appStateChange": AppStateChange { - "delta": Delta { - "deleted": { - "selectedElementIds": { - "id0": true, - }, - }, - "inserted": { - "selectedElementIds": {}, - }, - }, - }, - "elementsChange": ElementsChange { - "added": Map {}, - "removed": Map { - "id0" => Delta { - "deleted": { - "angle": 0, - "backgroundColor": "transparent", - "boundElements": null, - "customData": undefined, - "fillStyle": "solid", - "frameId": null, - "groupIds": [], - "height": 20, - "index": "a0", - "isDeleted": false, - "link": null, - "locked": false, - "opacity": 100, - "roughness": 1, - "roundness": { - "type": 3, - }, - "strokeColor": "#1e1e1e", - "strokeStyle": "solid", - "strokeWidth": 2, - "type": "rectangle", - "width": 20, - "x": -10, - "y": 0, - }, - "inserted": { - "isDeleted": true, - }, - }, - }, - "updated": Map {}, - }, - }, - HistoryEntry { - "appStateChange": AppStateChange { - "delta": Delta { - "deleted": { - "selectedElementIds": { - "id1": true, - }, - }, - "inserted": { - "selectedElementIds": { - "id0": true, - }, - }, - }, - }, - "elementsChange": ElementsChange { - "added": Map {}, - "removed": Map { - "id1" => Delta { - "deleted": { - "angle": 0, - "backgroundColor": "transparent", - "boundElements": null, - "customData": undefined, - "fillStyle": "solid", - "frameId": null, - "groupIds": [], - "height": 20, - "index": "a1", - "isDeleted": false, - "link": null, - "locked": false, - "opacity": 100, - "roughness": 1, - "roundness": { - "type": 3, - }, - "strokeColor": "#1e1e1e", - "strokeStyle": "solid", - "strokeWidth": 2, - "type": "rectangle", - "width": 20, - "x": 20, - "y": 30, - }, - "inserted": { - "isDeleted": true, - }, - }, - }, - "updated": Map {}, - }, - }, - ], -} -`; - -exports[`contextMenu element > selecting 'Bring forward' in context menu brings element forward > [end of test] number of elements 1`] = `2`; - -exports[`contextMenu element > selecting 'Bring forward' in context menu brings element forward > [end of test] number of renders 1`] = `11`; - -exports[`contextMenu element > selecting 'Bring to front' in context menu brings element to front > [end of test] appState 1`] = ` -{ - "activeEmbeddable": null, - "activeTool": { - "customType": null, - "lastActiveTool": null, - "locked": false, - "type": "selection", - }, - "collaborators": Map {}, - "contextMenu": { - "items": [ - "separator", - { - "icon": , - "keyTest": [Function], - "label": "labels.cut", - "name": "cut", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "icon": , - "keyTest": undefined, - "label": "labels.copy", - "name": "copy", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "keyTest": undefined, - "label": "labels.paste", - "name": "paste", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "label": "labels.selectAllElementsInFrame", - "name": "selectAllElementsInFrame", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "canvas", - }, - }, - { - "label": "labels.removeAllElementsFromFrame", - "name": "removeAllElementsFromFrame", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "history", - }, - }, - "separator", - { - "icon": , - "keyTest": [Function], - "keywords": [ - "png", - "clipboard", - "copy", - ], - "label": "labels.copyAsPng", - "name": "copyAsPng", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "icon": , - "keywords": [ - "svg", - "clipboard", - "copy", - ], - "label": "labels.copyAsSvg", - "name": "copyAsSvg", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "keywords": [ - "text", - "clipboard", - "copy", - ], - "label": "labels.copyText", - "name": "copyText", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", - }, - }, - "separator", - { - "icon": , - "keyTest": [Function], - "label": "labels.copyStyles", - "name": "copyStyles", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "icon": , - "keyTest": [Function], - "label": "labels.pasteStyles", - "name": "pasteStyles", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - "separator", - { - "PanelComponent": [Function], - "icon": [Function], - "keyTest": [Function], - "label": "labels.group", - "name": "group", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "icon": null, - "label": "labels.autoResize", - "name": "autoResize", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "label": "labels.unbindText", - "name": "unbindText", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "label": "labels.bindText", - "name": "bindText", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "label": "labels.createContainerFromText", - "name": "wrapTextInContainer", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "PanelComponent": [Function], - "icon": [Function], - "keyTest": [Function], - "label": "labels.ungroup", - "name": "ungroup", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", - }, - }, - "separator", - { - "label": "labels.addToLibrary", - "name": "addToLibrary", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - "separator", - { - "PanelComponent": [Function], - "icon": , - "keyPriority": 40, - "keyTest": [Function], - "keywords": [ - "move down", - "zindex", - "layer", - ], - "label": "labels.sendBackward", - "name": "sendBackward", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "PanelComponent": [Function], - "icon": , - "keyPriority": 40, - "keyTest": [Function], - "keywords": [ - "move up", - "zindex", - "layer", - ], - "label": "labels.bringForward", - "name": "bringForward", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "PanelComponent": [Function], - "icon": , - "keyTest": [Function], - "keywords": [ - "move down", - "zindex", - "layer", - ], - "label": "labels.sendToBack", - "name": "sendToBack", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "PanelComponent": [Function], - "icon": , - "keyTest": [Function], - "keywords": [ - "move up", - "zindex", - "layer", - ], - "label": "labels.bringToFront", - "name": "bringToFront", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - "separator", - { - "icon": , - "keyTest": [Function], - "label": "labels.flipHorizontal", - "name": "flipHorizontal", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "icon": , - "keyTest": [Function], - "label": "labels.flipVertical", - "name": "flipVertical", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - "separator", - { - "PanelComponent": [Function], - "category": "Elements", - "keywords": [ - "line", - ], - "label": [Function], - "name": "toggleLinearEditor", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "PanelComponent": [Function], - "icon": , - "keyTest": [Function], - "label": [Function], - "name": "hyperlink", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "action": "click", - "category": "hyperlink", - }, - }, - { - "PanelComponent": [Function], - "icon": , - "keyTest": [Function], - "label": "labels.duplicateSelection", - "name": "duplicateSelection", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "icon": [Function], - "keyTest": [Function], - "label": [Function], - "name": "toggleElementLock", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", - }, - }, - "separator", - { - "PanelComponent": [Function], - "icon": , - "keyTest": [Function], - "label": "labels.delete", - "name": "deleteSelectedElements", - "perform": [Function], - "trackEvent": { - "action": "delete", - "category": "element", - }, - }, - ], - "left": -10, - "top": 0, - }, - "currentChartType": "bar", - "currentHoveredFontFamily": null, - "currentItemArrowType": "round", - "currentItemBackgroundColor": "transparent", - "currentItemEndArrowhead": "arrow", - "currentItemFillStyle": "solid", - "currentItemFontFamily": 5, - "currentItemFontSize": 20, - "currentItemOpacity": 100, - "currentItemRoughness": 1, - "currentItemRoundness": "round", - "currentItemStartArrowhead": null, - "currentItemStrokeColor": "#1e1e1e", - "currentItemStrokeStyle": "solid", - "currentItemStrokeWidth": 2, - "currentItemTextAlign": "left", - "cursorButton": "up", - "defaultSidebarDockedPreference": false, - "editingElement": null, - "editingFrame": null, - "editingGroupId": null, - "editingLinearElement": null, - "elementsToHighlight": null, - "errorMessage": null, - "exportBackground": true, - "exportEmbedScene": false, - "exportScale": 1, - "exportWithDarkMode": false, - "featureFlagLibraryButton": false, - "featureFlagWelcomeScreen": false, - "fileHandle": null, - "followedBy": Set {}, - "frameRendering": { - "clip": true, - "enabled": true, - "name": true, - "outline": true, - }, - "frameToHighlight": null, - "gridModeEnabled": false, - "gridSize": 20, - "gridStep": 5, - "height": 100, - "isBindingEnabled": true, - "isLoading": false, - "isResizing": false, - "isRotating": false, - "lastPointerDownWith": "mouse", - "multiElement": null, - "name": "Unbenannt-201933152653", - "newElement": null, - "objectsSnapModeEnabled": false, - "offsetLeft": 20, - "offsetTop": 10, - "openDialog": null, - "openMenu": null, - "openPopup": null, - "openSidebar": null, - "originSnapOffset": null, - "pasteDialog": { - "data": null, - "shown": false, - }, - "penDetected": false, - "penMode": false, - "pendingImageElementId": null, - "previousSelectedElementIds": {}, - "resizingElement": null, - "scrollX": 0, - "scrollY": 0, - "scrolledOutside": false, - "selectedElementIds": { - "id0": true, - }, - "selectedElementsAreBeingDragged": false, - "selectedGroupIds": {}, - "selectedLinearElement": null, - "selectionElement": null, - "shouldCacheIgnoreZoom": false, - "showHyperlinkPopup": false, - "showWelcomeScreen": true, - "snapLines": [], - "startBoundElement": null, - "stats": { - "open": false, - "panels": 3, - }, - "suggestedBindings": [], - "theme": "light", - "toast": null, - "userToFollow": null, - "viewBackgroundColor": "#ffffff", - "viewModeEnabled": false, - "width": 200, - "zenModeEnabled": false, - "zoom": { - "value": 1, - }, -} -`; - -exports[`contextMenu element > selecting 'Bring to front' in context menu brings element to front > [end of test] element 0 1`] = ` -{ - "angle": 0, - "backgroundColor": "transparent", - "boundElements": null, - "customData": undefined, - "fillStyle": "solid", - "frameId": null, - "groupIds": [], - "height": 20, - "id": "id0", - "index": "a0", - "isDeleted": false, - "link": null, - "locked": false, - "opacity": 100, - "roughness": 1, - "roundness": { - "type": 3, - }, - "seed": 449462985, - "strokeColor": "#1e1e1e", - "strokeStyle": "solid", - "strokeWidth": 2, - "type": "rectangle", - "updated": 1, - "version": 3, - "versionNonce": 1150084233, - "width": 20, - "x": -10, - "y": 0, -} -`; - -exports[`contextMenu element > selecting 'Bring to front' in context menu brings element to front > [end of test] element 1 1`] = ` -{ - "angle": 0, - "backgroundColor": "transparent", - "boundElements": null, - "customData": undefined, - "fillStyle": "solid", - "frameId": null, - "groupIds": [], - "height": 20, - "id": "id1", - "index": "a1", - "isDeleted": false, - "link": null, - "locked": false, - "opacity": 100, - "roughness": 1, - "roundness": { - "type": 3, - }, - "seed": 1014066025, - "strokeColor": "#1e1e1e", - "strokeStyle": "solid", - "strokeWidth": 2, - "type": "rectangle", - "updated": 1, - "version": 3, - "versionNonce": 1604849351, - "width": 20, - "x": 20, - "y": 30, -} -`; - -exports[`contextMenu element > selecting 'Bring to front' in context menu brings element to front > [end of test] history 1`] = ` -History { - "onHistoryChangedEmitter": Emitter { - "subscribers": [ - [Function], - [Function], - ], - }, - "redoStack": [], - "undoStack": [ - HistoryEntry { - "appStateChange": AppStateChange { - "delta": Delta { - "deleted": { - "selectedElementIds": { - "id0": true, - }, - }, - "inserted": { - "selectedElementIds": {}, - }, - }, - }, - "elementsChange": ElementsChange { - "added": Map {}, - "removed": Map { - "id0" => Delta { - "deleted": { - "angle": 0, - "backgroundColor": "transparent", - "boundElements": null, - "customData": undefined, - "fillStyle": "solid", - "frameId": null, - "groupIds": [], - "height": 20, - "index": "a0", - "isDeleted": false, - "link": null, - "locked": false, - "opacity": 100, - "roughness": 1, - "roundness": { - "type": 3, - }, - "strokeColor": "#1e1e1e", - "strokeStyle": "solid", - "strokeWidth": 2, - "type": "rectangle", - "width": 20, - "x": -10, - "y": 0, - }, - "inserted": { - "isDeleted": true, - }, - }, - }, - "updated": Map {}, - }, - }, - HistoryEntry { - "appStateChange": AppStateChange { - "delta": Delta { - "deleted": { - "selectedElementIds": { - "id1": true, - }, - }, - "inserted": { - "selectedElementIds": { - "id0": true, - }, - }, - }, - }, - "elementsChange": ElementsChange { - "added": Map {}, - "removed": Map { - "id1" => Delta { - "deleted": { - "angle": 0, - "backgroundColor": "transparent", - "boundElements": null, - "customData": undefined, - "fillStyle": "solid", - "frameId": null, - "groupIds": [], - "height": 20, - "index": "a1", - "isDeleted": false, - "link": null, - "locked": false, - "opacity": 100, - "roughness": 1, - "roundness": { - "type": 3, - }, - "strokeColor": "#1e1e1e", - "strokeStyle": "solid", - "strokeWidth": 2, - "type": "rectangle", - "width": 20, - "x": 20, - "y": 30, - }, - "inserted": { - "isDeleted": true, - }, - }, - }, - "updated": Map {}, - }, - }, - ], -} -`; - -exports[`contextMenu element > selecting 'Bring to front' in context menu brings element to front > [end of test] number of elements 1`] = `2`; - -exports[`contextMenu element > selecting 'Bring to front' in context menu brings element to front > [end of test] number of renders 1`] = `11`; - -exports[`contextMenu element > selecting 'Copy styles' in context menu copies styles > [end of test] appState 1`] = ` -{ - "activeEmbeddable": null, - "activeTool": { - "customType": null, - "lastActiveTool": null, - "locked": false, - "type": "selection", - }, - "collaborators": Map {}, - "contextMenu": { - "items": [ - "separator", - { - "icon": , - "keyTest": [Function], - "label": "labels.cut", - "name": "cut", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "icon": , - "keyTest": undefined, - "label": "labels.copy", - "name": "copy", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "keyTest": undefined, - "label": "labels.paste", - "name": "paste", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "label": "labels.selectAllElementsInFrame", - "name": "selectAllElementsInFrame", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "canvas", - }, - }, - { - "label": "labels.removeAllElementsFromFrame", - "name": "removeAllElementsFromFrame", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "history", - }, - }, - "separator", - { - "icon": , - "keyTest": [Function], - "keywords": [ - "png", - "clipboard", - "copy", - ], - "label": "labels.copyAsPng", - "name": "copyAsPng", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "icon": , - "keywords": [ - "svg", - "clipboard", - "copy", - ], - "label": "labels.copyAsSvg", - "name": "copyAsSvg", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "keywords": [ - "text", - "clipboard", - "copy", - ], - "label": "labels.copyText", - "name": "copyText", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", - }, - }, - "separator", - { - "icon": , - "keyTest": [Function], - "label": "labels.copyStyles", - "name": "copyStyles", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "icon": , - "keyTest": [Function], - "label": "labels.pasteStyles", - "name": "pasteStyles", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - "separator", - { - "PanelComponent": [Function], - "icon": [Function], - "keyTest": [Function], - "label": "labels.group", - "name": "group", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "icon": null, - "label": "labels.autoResize", - "name": "autoResize", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "label": "labels.unbindText", - "name": "unbindText", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "label": "labels.bindText", - "name": "bindText", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "label": "labels.createContainerFromText", - "name": "wrapTextInContainer", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "PanelComponent": [Function], - "icon": [Function], - "keyTest": [Function], - "label": "labels.ungroup", - "name": "ungroup", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", - }, - }, - "separator", - { - "label": "labels.addToLibrary", - "name": "addToLibrary", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - "separator", - { - "PanelComponent": [Function], - "icon": , - "keyPriority": 40, - "keyTest": [Function], - "keywords": [ - "move down", - "zindex", - "layer", - ], - "label": "labels.sendBackward", - "name": "sendBackward", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "PanelComponent": [Function], - "icon": , - "keyPriority": 40, - "keyTest": [Function], - "keywords": [ - "move up", - "zindex", - "layer", - ], - "label": "labels.bringForward", - "name": "bringForward", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "PanelComponent": [Function], - "icon": , - "keyTest": [Function], - "keywords": [ - "move down", - "zindex", - "layer", - ], - "label": "labels.sendToBack", - "name": "sendToBack", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "PanelComponent": [Function], - "icon": , - "keyTest": [Function], - "keywords": [ - "move up", - "zindex", - "layer", - ], - "label": "labels.bringToFront", - "name": "bringToFront", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - "separator", - { - "icon": , - "keyTest": [Function], - "label": "labels.flipHorizontal", - "name": "flipHorizontal", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "icon": , - "keyTest": [Function], - "label": "labels.flipVertical", - "name": "flipVertical", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - "separator", - { - "PanelComponent": [Function], - "category": "Elements", - "keywords": [ - "line", - ], - "label": [Function], - "name": "toggleLinearEditor", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "PanelComponent": [Function], - "icon": , - "keyTest": [Function], - "label": [Function], - "name": "hyperlink", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "action": "click", - "category": "hyperlink", - }, - }, - { - "PanelComponent": [Function], - "icon": , - "keyTest": [Function], - "label": "labels.duplicateSelection", - "name": "duplicateSelection", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "icon": [Function], - "keyTest": [Function], - "label": [Function], - "name": "toggleElementLock", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", - }, - }, - "separator", - { - "PanelComponent": [Function], - "icon": , - "keyTest": [Function], - "label": "labels.delete", - "name": "deleteSelectedElements", - "perform": [Function], - "trackEvent": { - "action": "delete", - "category": "element", - }, - }, - ], - "left": -17, - "top": -7, - }, - "currentChartType": "bar", - "currentHoveredFontFamily": null, - "currentItemArrowType": "round", - "currentItemBackgroundColor": "transparent", - "currentItemEndArrowhead": "arrow", - "currentItemFillStyle": "solid", - "currentItemFontFamily": 5, - "currentItemFontSize": 20, - "currentItemOpacity": 100, - "currentItemRoughness": 1, - "currentItemRoundness": "round", - "currentItemStartArrowhead": null, - "currentItemStrokeColor": "#1e1e1e", - "currentItemStrokeStyle": "solid", - "currentItemStrokeWidth": 2, - "currentItemTextAlign": "left", - "cursorButton": "up", - "defaultSidebarDockedPreference": false, - "editingElement": null, - "editingFrame": null, - "editingGroupId": null, - "editingLinearElement": null, - "elementsToHighlight": null, - "errorMessage": null, - "exportBackground": true, - "exportEmbedScene": false, - "exportScale": 1, - "exportWithDarkMode": false, - "featureFlagLibraryButton": false, - "featureFlagWelcomeScreen": false, - "fileHandle": null, - "followedBy": Set {}, - "frameRendering": { - "clip": true, - "enabled": true, - "name": true, - "outline": true, - }, - "frameToHighlight": null, - "gridModeEnabled": false, - "gridSize": 20, - "gridStep": 5, - "height": 100, - "isBindingEnabled": true, - "isLoading": false, - "isResizing": false, - "isRotating": false, - "lastPointerDownWith": "mouse", - "multiElement": null, - "name": "Unbenannt-201933152653", - "newElement": null, - "objectsSnapModeEnabled": false, - "offsetLeft": 20, - "offsetTop": 10, - "openDialog": null, - "openMenu": null, - "openPopup": null, - "openSidebar": null, - "originSnapOffset": null, - "pasteDialog": { - "data": null, - "shown": false, - }, - "penDetected": false, - "penMode": false, - "pendingImageElementId": null, - "previousSelectedElementIds": {}, - "resizingElement": null, - "scrollX": 0, - "scrollY": 0, - "scrolledOutside": false, - "selectedElementIds": { - "id0": true, - }, - "selectedElementsAreBeingDragged": false, - "selectedGroupIds": {}, - "selectedLinearElement": null, - "selectionElement": null, - "shouldCacheIgnoreZoom": false, - "showHyperlinkPopup": false, - "showWelcomeScreen": true, - "snapLines": [], - "startBoundElement": null, - "stats": { - "open": false, - "panels": 3, - }, - "suggestedBindings": [], - "theme": "light", - "toast": null, - "userToFollow": null, - "viewBackgroundColor": "#ffffff", - "viewModeEnabled": false, - "width": 200, - "zenModeEnabled": false, - "zoom": { - "value": 1, - }, -} -`; - -exports[`contextMenu element > selecting 'Copy styles' in context menu copies styles > [end of test] element 0 1`] = ` -{ - "angle": 0, - "backgroundColor": "transparent", - "boundElements": null, - "customData": undefined, - "fillStyle": "solid", - "frameId": null, - "groupIds": [], - "height": 20, - "id": "id0", - "index": "a0", - "isDeleted": false, - "link": null, - "locked": false, - "opacity": 100, - "roughness": 1, - "roundness": { - "type": 3, - }, - "seed": 449462985, - "strokeColor": "#1e1e1e", - "strokeStyle": "solid", - "strokeWidth": 2, - "type": "rectangle", - "updated": 1, - "version": 3, - "versionNonce": 1150084233, - "width": 20, - "x": -10, - "y": 0, -} -`; - -exports[`contextMenu element > selecting 'Copy styles' in context menu copies styles > [end of test] history 1`] = ` -History { - "onHistoryChangedEmitter": Emitter { - "subscribers": [ - [Function], - [Function], - ], - }, - "redoStack": [], - "undoStack": [ - HistoryEntry { - "appStateChange": AppStateChange { - "delta": Delta { - "deleted": { - "selectedElementIds": { - "id0": true, - }, - }, - "inserted": { - "selectedElementIds": {}, - }, - }, - }, - "elementsChange": ElementsChange { - "added": Map {}, - "removed": Map { - "id0" => Delta { - "deleted": { - "angle": 0, - "backgroundColor": "transparent", - "boundElements": null, - "customData": undefined, - "fillStyle": "solid", - "frameId": null, - "groupIds": [], - "height": 20, - "index": "a0", - "isDeleted": false, - "link": null, - "locked": false, - "opacity": 100, - "roughness": 1, - "roundness": { - "type": 3, - }, - "strokeColor": "#1e1e1e", - "strokeStyle": "solid", - "strokeWidth": 2, - "type": "rectangle", - "width": 20, - "x": -10, - "y": 0, - }, - "inserted": { - "isDeleted": true, - }, - }, - }, - "updated": Map {}, - }, - }, - ], -} -`; - -exports[`contextMenu element > selecting 'Copy styles' in context menu copies styles > [end of test] number of elements 1`] = `1`; - -exports[`contextMenu element > selecting 'Copy styles' in context menu copies styles > [end of test] number of renders 1`] = `6`; - -exports[`contextMenu element > selecting 'Delete' in context menu deletes element > [end of test] appState 1`] = ` -{ - "activeEmbeddable": null, - "activeTool": { - "customType": null, - "lastActiveTool": null, - "locked": false, - "type": "selection", - }, - "collaborators": Map {}, - "contextMenu": null, - "currentChartType": "bar", - "currentHoveredFontFamily": null, - "currentItemArrowType": "round", - "currentItemBackgroundColor": "transparent", - "currentItemEndArrowhead": "arrow", - "currentItemFillStyle": "solid", - "currentItemFontFamily": 5, - "currentItemFontSize": 20, - "currentItemOpacity": 100, - "currentItemRoughness": 1, - "currentItemRoundness": "round", - "currentItemStartArrowhead": null, - "currentItemStrokeColor": "#1e1e1e", - "currentItemStrokeStyle": "solid", - "currentItemStrokeWidth": 2, - "currentItemTextAlign": "left", - "cursorButton": "up", - "defaultSidebarDockedPreference": false, - "editingElement": null, - "editingFrame": null, - "editingGroupId": null, - "editingLinearElement": null, - "elementsToHighlight": null, - "errorMessage": null, - "exportBackground": true, - "exportEmbedScene": false, - "exportScale": 1, - "exportWithDarkMode": false, - "featureFlagLibraryButton": false, - "featureFlagWelcomeScreen": false, - "fileHandle": null, - "followedBy": Set {}, - "frameRendering": { - "clip": true, - "enabled": true, - "name": true, - "outline": true, - }, - "frameToHighlight": null, - "gridModeEnabled": false, - "gridSize": 20, - "gridStep": 5, - "height": 100, - "isBindingEnabled": true, - "isLoading": false, - "isResizing": false, - "isRotating": false, - "lastPointerDownWith": "mouse", - "multiElement": null, - "name": "Unbenannt-201933152653", - "newElement": null, - "objectsSnapModeEnabled": false, - "offsetLeft": 20, - "offsetTop": 10, - "openDialog": null, - "openMenu": null, - "openPopup": null, - "openSidebar": null, - "originSnapOffset": null, - "pasteDialog": { - "data": null, - "shown": false, - }, - "penDetected": false, - "penMode": false, - "pendingImageElementId": null, - "previousSelectedElementIds": {}, - "resizingElement": null, - "scrollX": 0, - "scrollY": 0, - "scrolledOutside": false, - "selectedElementIds": {}, - "selectedElementsAreBeingDragged": false, - "selectedGroupIds": {}, - "selectedLinearElement": null, - "selectionElement": null, - "shouldCacheIgnoreZoom": false, - "showHyperlinkPopup": false, - "showWelcomeScreen": true, - "snapLines": [], - "startBoundElement": null, - "stats": { - "open": false, - "panels": 3, - }, - "suggestedBindings": [], - "theme": "light", - "toast": null, - "userToFollow": null, - "viewBackgroundColor": "#ffffff", - "viewModeEnabled": false, - "width": 200, - "zenModeEnabled": false, - "zoom": { - "value": 1, - }, -} -`; - -exports[`contextMenu element > selecting 'Delete' in context menu deletes element > [end of test] element 0 1`] = ` -{ - "angle": 0, - "backgroundColor": "transparent", - "boundElements": null, - "customData": undefined, - "fillStyle": "solid", - "frameId": null, - "groupIds": [], - "height": 20, - "id": "id0", - "index": "a0", - "isDeleted": true, - "link": null, - "locked": false, - "opacity": 100, - "roughness": 1, - "roundness": { - "type": 3, - }, - "seed": 449462985, - "strokeColor": "#1e1e1e", - "strokeStyle": "solid", - "strokeWidth": 2, - "type": "rectangle", - "updated": 1, - "version": 4, - "versionNonce": 1014066025, - "width": 20, - "x": -10, - "y": 0, -} -`; - -exports[`contextMenu element > selecting 'Delete' in context menu deletes element > [end of test] history 1`] = ` -History { - "onHistoryChangedEmitter": Emitter { - "subscribers": [ - [Function], - [Function], - ], - }, - "redoStack": [], - "undoStack": [ - HistoryEntry { - "appStateChange": AppStateChange { - "delta": Delta { - "deleted": { - "selectedElementIds": { - "id0": true, - }, - }, - "inserted": { - "selectedElementIds": {}, - }, - }, - }, - "elementsChange": ElementsChange { - "added": Map {}, - "removed": Map { - "id0" => Delta { - "deleted": { - "angle": 0, - "backgroundColor": "transparent", - "boundElements": null, - "customData": undefined, - "fillStyle": "solid", - "frameId": null, - "groupIds": [], - "height": 20, - "index": "a0", - "isDeleted": false, - "link": null, - "locked": false, - "opacity": 100, - "roughness": 1, - "roundness": { - "type": 3, - }, - "strokeColor": "#1e1e1e", - "strokeStyle": "solid", - "strokeWidth": 2, - "type": "rectangle", - "width": 20, - "x": -10, - "y": 0, - }, - "inserted": { - "isDeleted": true, - }, - }, - }, - "updated": Map {}, - }, - }, - HistoryEntry { - "appStateChange": AppStateChange { - "delta": Delta { - "deleted": { - "selectedElementIds": {}, - }, - "inserted": { - "selectedElementIds": { - "id0": true, - }, - }, - }, - }, - "elementsChange": ElementsChange { - "added": Map { - "id0" => Delta { - "deleted": { - "isDeleted": true, - }, - "inserted": { - "isDeleted": false, - }, - }, - }, - "removed": Map {}, - "updated": Map {}, - }, - }, - ], -} -`; - -exports[`contextMenu element > selecting 'Delete' in context menu deletes element > [end of test] number of elements 1`] = `1`; - -exports[`contextMenu element > selecting 'Delete' in context menu deletes element > [end of test] number of renders 1`] = `7`; - -exports[`contextMenu element > selecting 'Duplicate' in context menu duplicates element > [end of test] appState 1`] = ` -{ - "activeEmbeddable": null, - "activeTool": { - "customType": null, - "lastActiveTool": null, - "locked": false, - "type": "selection", - }, - "collaborators": Map {}, - "contextMenu": { - "items": [ - "separator", - { - "icon": , - "keyTest": [Function], - "label": "labels.cut", - "name": "cut", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "icon": , - "keyTest": undefined, - "label": "labels.copy", - "name": "copy", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "keyTest": undefined, - "label": "labels.paste", - "name": "paste", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "label": "labels.selectAllElementsInFrame", - "name": "selectAllElementsInFrame", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "canvas", - }, - }, - { - "label": "labels.removeAllElementsFromFrame", - "name": "removeAllElementsFromFrame", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "history", - }, - }, - "separator", - { - "icon": , - "keyTest": [Function], - "keywords": [ - "png", - "clipboard", - "copy", - ], - "label": "labels.copyAsPng", - "name": "copyAsPng", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "icon": , - "keywords": [ - "svg", - "clipboard", - "copy", - ], - "label": "labels.copyAsSvg", - "name": "copyAsSvg", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "keywords": [ - "text", - "clipboard", - "copy", - ], - "label": "labels.copyText", - "name": "copyText", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", - }, - }, - "separator", - { - "icon": , - "keyTest": [Function], - "label": "labels.copyStyles", - "name": "copyStyles", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "icon": , - "keyTest": [Function], - "label": "labels.pasteStyles", - "name": "pasteStyles", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - "separator", - { - "PanelComponent": [Function], - "icon": [Function], - "keyTest": [Function], - "label": "labels.group", - "name": "group", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "icon": null, - "label": "labels.autoResize", - "name": "autoResize", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "label": "labels.unbindText", - "name": "unbindText", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "label": "labels.bindText", - "name": "bindText", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "label": "labels.createContainerFromText", - "name": "wrapTextInContainer", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "PanelComponent": [Function], - "icon": [Function], - "keyTest": [Function], - "label": "labels.ungroup", - "name": "ungroup", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", - }, - }, - "separator", - { - "label": "labels.addToLibrary", - "name": "addToLibrary", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - "separator", - { - "PanelComponent": [Function], - "icon": , - "keyPriority": 40, - "keyTest": [Function], - "keywords": [ - "move down", - "zindex", - "layer", - ], - "label": "labels.sendBackward", - "name": "sendBackward", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "PanelComponent": [Function], - "icon": , - "keyPriority": 40, - "keyTest": [Function], - "keywords": [ - "move up", - "zindex", - "layer", - ], - "label": "labels.bringForward", - "name": "bringForward", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "PanelComponent": [Function], - "icon": , - "keyTest": [Function], - "keywords": [ - "move down", - "zindex", - "layer", - ], - "label": "labels.sendToBack", - "name": "sendToBack", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "PanelComponent": [Function], - "icon": , - "keyTest": [Function], - "keywords": [ - "move up", - "zindex", - "layer", - ], - "label": "labels.bringToFront", - "name": "bringToFront", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - "separator", - { - "icon": , - "keyTest": [Function], - "label": "labels.flipHorizontal", - "name": "flipHorizontal", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "icon": , - "keyTest": [Function], - "label": "labels.flipVertical", - "name": "flipVertical", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - "separator", - { - "PanelComponent": [Function], - "category": "Elements", - "keywords": [ - "line", - ], - "label": [Function], - "name": "toggleLinearEditor", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "PanelComponent": [Function], - "icon": , - "keyTest": [Function], - "label": [Function], - "name": "hyperlink", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "action": "click", - "category": "hyperlink", - }, - }, - { - "PanelComponent": [Function], - "icon": , - "keyTest": [Function], - "label": "labels.duplicateSelection", - "name": "duplicateSelection", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "icon": [Function], - "keyTest": [Function], - "label": [Function], - "name": "toggleElementLock", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", - }, - }, - "separator", - { - "PanelComponent": [Function], - "icon": , - "keyTest": [Function], - "label": "labels.delete", - "name": "deleteSelectedElements", - "perform": [Function], - "trackEvent": { - "action": "delete", - "category": "element", - }, - }, - ], - "left": -17, - "top": -7, - }, - "currentChartType": "bar", - "currentHoveredFontFamily": null, - "currentItemArrowType": "round", - "currentItemBackgroundColor": "transparent", - "currentItemEndArrowhead": "arrow", - "currentItemFillStyle": "solid", - "currentItemFontFamily": 5, - "currentItemFontSize": 20, - "currentItemOpacity": 100, - "currentItemRoughness": 1, - "currentItemRoundness": "round", - "currentItemStartArrowhead": null, - "currentItemStrokeColor": "#1e1e1e", - "currentItemStrokeStyle": "solid", - "currentItemStrokeWidth": 2, - "currentItemTextAlign": "left", - "cursorButton": "up", - "defaultSidebarDockedPreference": false, - "editingElement": null, - "editingFrame": null, - "editingGroupId": null, - "editingLinearElement": null, - "elementsToHighlight": null, - "errorMessage": null, - "exportBackground": true, - "exportEmbedScene": false, - "exportScale": 1, - "exportWithDarkMode": false, - "featureFlagLibraryButton": false, - "featureFlagWelcomeScreen": false, - "fileHandle": null, - "followedBy": Set {}, - "frameRendering": { - "clip": true, - "enabled": true, - "name": true, - "outline": true, - }, - "frameToHighlight": null, - "gridModeEnabled": false, - "gridSize": 20, - "gridStep": 5, - "height": 100, - "isBindingEnabled": true, - "isLoading": false, - "isResizing": false, - "isRotating": false, - "lastPointerDownWith": "mouse", - "multiElement": null, - "name": "Unbenannt-201933152653", - "newElement": null, - "objectsSnapModeEnabled": false, - "offsetLeft": 20, - "offsetTop": 10, - "openDialog": null, - "openMenu": null, - "openPopup": null, - "openSidebar": null, - "originSnapOffset": null, - "pasteDialog": { - "data": null, - "shown": false, - }, - "penDetected": false, - "penMode": false, - "pendingImageElementId": null, - "previousSelectedElementIds": {}, - "resizingElement": null, - "scrollX": 0, - "scrollY": 0, - "scrolledOutside": false, - "selectedElementIds": { - "id0": true, - }, - "selectedElementsAreBeingDragged": false, - "selectedGroupIds": {}, - "selectedLinearElement": null, - "selectionElement": null, - "shouldCacheIgnoreZoom": false, - "showHyperlinkPopup": false, - "showWelcomeScreen": true, - "snapLines": [], - "startBoundElement": null, - "stats": { - "open": false, - "panels": 3, - }, - "suggestedBindings": [], - "theme": "light", - "toast": null, - "userToFollow": null, - "viewBackgroundColor": "#ffffff", - "viewModeEnabled": false, - "width": 200, - "zenModeEnabled": false, - "zoom": { - "value": 1, - }, -} -`; - -exports[`contextMenu element > selecting 'Duplicate' in context menu duplicates element > [end of test] element 0 1`] = ` -{ - "angle": 0, - "backgroundColor": "transparent", - "boundElements": null, - "customData": undefined, - "fillStyle": "solid", - "frameId": null, - "groupIds": [], - "height": 20, - "id": "id0", - "index": "a0", - "isDeleted": false, - "link": null, - "locked": false, - "opacity": 100, - "roughness": 1, - "roundness": { - "type": 3, - }, - "seed": 449462985, - "strokeColor": "#1e1e1e", - "strokeStyle": "solid", - "strokeWidth": 2, - "type": "rectangle", - "updated": 1, - "version": 3, - "versionNonce": 1150084233, - "width": 20, - "x": -10, - "y": 0, -} -`; - -exports[`contextMenu element > selecting 'Duplicate' in context menu duplicates element > [end of test] history 1`] = ` -History { - "onHistoryChangedEmitter": Emitter { - "subscribers": [ - [Function], - [Function], - ], - }, - "redoStack": [], - "undoStack": [ - HistoryEntry { - "appStateChange": AppStateChange { - "delta": Delta { - "deleted": { - "selectedElementIds": { - "id0": true, - }, - }, - "inserted": { - "selectedElementIds": {}, - }, - }, - }, - "elementsChange": ElementsChange { - "added": Map {}, - "removed": Map { - "id0" => Delta { - "deleted": { - "angle": 0, - "backgroundColor": "transparent", - "boundElements": null, - "customData": undefined, - "fillStyle": "solid", - "frameId": null, - "groupIds": [], - "height": 20, - "index": "a0", - "isDeleted": false, - "link": null, - "locked": false, - "opacity": 100, - "roughness": 1, - "roundness": { - "type": 3, - }, - "strokeColor": "#1e1e1e", - "strokeStyle": "solid", - "strokeWidth": 2, - "type": "rectangle", - "width": 20, - "x": -10, - "y": 0, - }, - "inserted": { - "isDeleted": true, - }, - }, - }, - "updated": Map {}, - }, - }, - ], -} -`; - -exports[`contextMenu element > selecting 'Duplicate' in context menu duplicates element > [end of test] number of elements 1`] = `1`; - -exports[`contextMenu element > selecting 'Duplicate' in context menu duplicates element > [end of test] number of renders 1`] = `6`; - -exports[`contextMenu element > selecting 'Group selection' in context menu groups selected elements > [end of test] appState 1`] = ` -{ - "activeEmbeddable": null, - "activeTool": { - "customType": null, - "lastActiveTool": null, - "locked": false, - "type": "selection", - }, - "collaborators": Map {}, - "contextMenu": { - "items": [ - "separator", - { - "icon": , - "keyTest": [Function], - "label": "labels.cut", - "name": "cut", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "icon": , - "keyTest": undefined, - "label": "labels.copy", - "name": "copy", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "keyTest": undefined, - "label": "labels.paste", - "name": "paste", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "label": "labels.selectAllElementsInFrame", - "name": "selectAllElementsInFrame", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "canvas", - }, - }, - { - "label": "labels.removeAllElementsFromFrame", - "name": "removeAllElementsFromFrame", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "history", - }, - }, - "separator", - { - "icon": , - "keyTest": [Function], - "keywords": [ - "png", - "clipboard", - "copy", - ], - "label": "labels.copyAsPng", - "name": "copyAsPng", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "icon": , - "keywords": [ - "svg", - "clipboard", - "copy", - ], - "label": "labels.copyAsSvg", - "name": "copyAsSvg", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "keywords": [ - "text", - "clipboard", - "copy", - ], - "label": "labels.copyText", - "name": "copyText", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", - }, - }, - "separator", - { - "icon": , - "keyTest": [Function], - "label": "labels.copyStyles", - "name": "copyStyles", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "icon": , - "keyTest": [Function], - "label": "labels.pasteStyles", - "name": "pasteStyles", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - "separator", - { - "PanelComponent": [Function], - "icon": [Function], - "keyTest": [Function], - "label": "labels.group", - "name": "group", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "icon": null, - "label": "labels.autoResize", - "name": "autoResize", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "label": "labels.unbindText", - "name": "unbindText", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "label": "labels.bindText", - "name": "bindText", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "label": "labels.createContainerFromText", - "name": "wrapTextInContainer", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "PanelComponent": [Function], - "icon": [Function], - "keyTest": [Function], - "label": "labels.ungroup", - "name": "ungroup", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", - }, - }, - "separator", - { - "label": "labels.addToLibrary", - "name": "addToLibrary", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - "separator", - { - "PanelComponent": [Function], - "icon": , - "keyPriority": 40, - "keyTest": [Function], - "keywords": [ - "move down", - "zindex", - "layer", - ], - "label": "labels.sendBackward", - "name": "sendBackward", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "PanelComponent": [Function], - "icon": , - "keyPriority": 40, - "keyTest": [Function], - "keywords": [ - "move up", - "zindex", - "layer", - ], - "label": "labels.bringForward", - "name": "bringForward", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "PanelComponent": [Function], - "icon": , - "keyTest": [Function], - "keywords": [ - "move down", - "zindex", - "layer", - ], - "label": "labels.sendToBack", - "name": "sendToBack", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "PanelComponent": [Function], - "icon": , - "keyTest": [Function], - "keywords": [ - "move up", - "zindex", - "layer", - ], - "label": "labels.bringToFront", - "name": "bringToFront", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - "separator", - { - "icon": , - "keyTest": [Function], - "label": "labels.flipHorizontal", - "name": "flipHorizontal", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "icon": , - "keyTest": [Function], - "label": "labels.flipVertical", - "name": "flipVertical", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - "separator", - { - "PanelComponent": [Function], - "category": "Elements", - "keywords": [ - "line", - ], - "label": [Function], - "name": "toggleLinearEditor", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "PanelComponent": [Function], - "icon": , - "keyTest": [Function], - "label": [Function], - "name": "hyperlink", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "action": "click", - "category": "hyperlink", - }, - }, - { - "PanelComponent": [Function], - "icon": , - "keyTest": [Function], - "label": "labels.duplicateSelection", - "name": "duplicateSelection", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "icon": [Function], - "keyTest": [Function], - "label": [Function], - "name": "toggleElementLock", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", - }, - }, - "separator", - { - "PanelComponent": [Function], - "icon": , - "keyTest": [Function], - "label": "labels.delete", - "name": "deleteSelectedElements", - "perform": [Function], - "trackEvent": { - "action": "delete", - "category": "element", - }, - }, - ], - "left": -17, - "top": -7, - }, - "currentChartType": "bar", - "currentHoveredFontFamily": null, - "currentItemArrowType": "round", - "currentItemBackgroundColor": "transparent", - "currentItemEndArrowhead": "arrow", - "currentItemFillStyle": "solid", - "currentItemFontFamily": 5, - "currentItemFontSize": 20, - "currentItemOpacity": 100, - "currentItemRoughness": 1, - "currentItemRoundness": "round", - "currentItemStartArrowhead": null, - "currentItemStrokeColor": "#1e1e1e", - "currentItemStrokeStyle": "solid", - "currentItemStrokeWidth": 2, - "currentItemTextAlign": "left", - "cursorButton": "up", - "defaultSidebarDockedPreference": false, - "editingElement": null, - "editingFrame": null, - "editingGroupId": null, - "editingLinearElement": null, - "elementsToHighlight": null, - "errorMessage": null, - "exportBackground": true, - "exportEmbedScene": false, - "exportScale": 1, - "exportWithDarkMode": false, - "featureFlagLibraryButton": false, - "featureFlagWelcomeScreen": false, - "fileHandle": null, - "followedBy": Set {}, - "frameRendering": { - "clip": true, - "enabled": true, - "name": true, - "outline": true, - }, - "frameToHighlight": null, - "gridModeEnabled": false, - "gridSize": 20, - "gridStep": 5, - "height": 100, - "isBindingEnabled": true, - "isLoading": false, - "isResizing": false, - "isRotating": false, - "lastPointerDownWith": "mouse", - "multiElement": null, - "name": "Unbenannt-201933152653", - "newElement": null, - "objectsSnapModeEnabled": false, - "offsetLeft": 20, - "offsetTop": 10, - "openDialog": null, - "openMenu": null, - "openPopup": null, - "openSidebar": null, - "originSnapOffset": null, - "pasteDialog": { - "data": null, - "shown": false, - }, - "penDetected": false, - "penMode": false, - "pendingImageElementId": null, - "previousSelectedElementIds": { - "id1": true, - }, - "resizingElement": null, - "scrollX": 0, - "scrollY": 0, - "scrolledOutside": false, - "selectedElementIds": { - "id0": true, - "id1": true, - }, - "selectedElementsAreBeingDragged": false, - "selectedGroupIds": {}, - "selectedLinearElement": null, - "selectionElement": null, - "shouldCacheIgnoreZoom": false, - "showHyperlinkPopup": false, - "showWelcomeScreen": true, - "snapLines": [], - "startBoundElement": null, - "stats": { - "open": false, - "panels": 3, - }, - "suggestedBindings": [], - "theme": "light", - "toast": null, - "userToFollow": null, - "viewBackgroundColor": "#ffffff", - "viewModeEnabled": false, - "width": 200, - "zenModeEnabled": false, - "zoom": { - "value": 1, - }, -} -`; - -exports[`contextMenu element > selecting 'Group selection' in context menu groups selected elements > [end of test] element 0 1`] = ` -{ - "angle": 0, - "backgroundColor": "transparent", - "boundElements": null, - "customData": undefined, - "fillStyle": "solid", - "frameId": null, - "groupIds": [], - "height": 20, - "id": "id0", - "index": "a0", - "isDeleted": false, - "link": null, - "locked": false, - "opacity": 100, - "roughness": 1, - "roundness": { - "type": 3, - }, - "seed": 449462985, - "strokeColor": "#1e1e1e", - "strokeStyle": "solid", - "strokeWidth": 2, - "type": "rectangle", - "updated": 1, - "version": 3, - "versionNonce": 1150084233, - "width": 20, - "x": -10, - "y": 0, -} -`; - -exports[`contextMenu element > selecting 'Group selection' in context menu groups selected elements > [end of test] element 1 1`] = ` -{ - "angle": 0, - "backgroundColor": "transparent", - "boundElements": null, - "customData": undefined, - "fillStyle": "solid", - "frameId": null, - "groupIds": [], - "height": 20, - "id": "id1", - "index": "a1", - "isDeleted": false, - "link": null, - "locked": false, - "opacity": 100, - "roughness": 1, - "roundness": { - "type": 3, - }, - "seed": 1014066025, - "strokeColor": "#1e1e1e", - "strokeStyle": "solid", - "strokeWidth": 2, - "type": "rectangle", - "updated": 1, - "version": 3, - "versionNonce": 1604849351, - "width": 20, - "x": 20, - "y": 30, -} -`; - -exports[`contextMenu element > selecting 'Group selection' in context menu groups selected elements > [end of test] history 1`] = ` -History { - "onHistoryChangedEmitter": Emitter { - "subscribers": [ - [Function], - [Function], - ], - }, - "redoStack": [], - "undoStack": [ - HistoryEntry { - "appStateChange": AppStateChange { - "delta": Delta { - "deleted": { - "selectedElementIds": { - "id0": true, - }, - }, - "inserted": { - "selectedElementIds": {}, - }, - }, - }, - "elementsChange": ElementsChange { - "added": Map {}, - "removed": Map { - "id0" => Delta { - "deleted": { - "angle": 0, - "backgroundColor": "transparent", - "boundElements": null, - "customData": undefined, - "fillStyle": "solid", - "frameId": null, - "groupIds": [], - "height": 20, - "index": "a0", - "isDeleted": false, - "link": null, - "locked": false, - "opacity": 100, - "roughness": 1, - "roundness": { - "type": 3, - }, - "strokeColor": "#1e1e1e", - "strokeStyle": "solid", - "strokeWidth": 2, - "type": "rectangle", - "width": 20, - "x": -10, - "y": 0, - }, - "inserted": { - "isDeleted": true, - }, - }, - }, - "updated": Map {}, - }, - }, - HistoryEntry { - "appStateChange": AppStateChange { - "delta": Delta { - "deleted": { - "selectedElementIds": { - "id1": true, - }, - }, - "inserted": { - "selectedElementIds": { - "id0": true, - }, - }, - }, - }, - "elementsChange": ElementsChange { - "added": Map {}, - "removed": Map { - "id1" => Delta { - "deleted": { - "angle": 0, - "backgroundColor": "transparent", - "boundElements": null, - "customData": undefined, - "fillStyle": "solid", - "frameId": null, - "groupIds": [], - "height": 20, - "index": "a1", - "isDeleted": false, - "link": null, - "locked": false, - "opacity": 100, - "roughness": 1, - "roundness": { - "type": 3, - }, - "strokeColor": "#1e1e1e", - "strokeStyle": "solid", - "strokeWidth": 2, - "type": "rectangle", - "width": 20, - "x": 20, - "y": 30, - }, - "inserted": { - "isDeleted": true, - }, - }, - }, - "updated": Map {}, - }, - }, - HistoryEntry { - "appStateChange": AppStateChange { - "delta": Delta { - "deleted": { - "selectedElementIds": { - "id0": true, - }, - }, - "inserted": { - "selectedElementIds": {}, - }, - }, - }, - "elementsChange": ElementsChange { - "added": Map {}, - "removed": Map {}, - "updated": Map {}, - }, - }, - ], -} -`; - -exports[`contextMenu element > selecting 'Group selection' in context menu groups selected elements > [end of test] number of elements 1`] = `2`; - -exports[`contextMenu element > selecting 'Group selection' in context menu groups selected elements > [end of test] number of renders 1`] = `11`; - -exports[`contextMenu element > selecting 'Paste styles' in context menu pastes styles > [end of test] appState 1`] = ` -{ - "activeEmbeddable": null, - "activeTool": { - "customType": null, - "lastActiveTool": null, - "locked": false, - "type": "selection", - }, - "collaborators": Map {}, - "contextMenu": null, - "currentChartType": "bar", - "currentHoveredFontFamily": null, - "currentItemArrowType": "round", - "currentItemBackgroundColor": "#a5d8ff", - "currentItemEndArrowhead": "arrow", - "currentItemFillStyle": "solid", - "currentItemFontFamily": 5, - "currentItemFontSize": 20, - "currentItemOpacity": 100, - "currentItemRoughness": 1, - "currentItemRoundness": "round", - "currentItemStartArrowhead": null, - "currentItemStrokeColor": "#e03131", - "currentItemStrokeStyle": "solid", - "currentItemStrokeWidth": 2, - "currentItemTextAlign": "left", - "cursorButton": "up", - "defaultSidebarDockedPreference": false, - "editingElement": null, - "editingFrame": null, - "editingGroupId": null, - "editingLinearElement": null, - "elementsToHighlight": null, - "errorMessage": null, - "exportBackground": true, - "exportEmbedScene": false, - "exportScale": 1, - "exportWithDarkMode": false, - "featureFlagLibraryButton": false, - "featureFlagWelcomeScreen": false, - "fileHandle": null, - "followedBy": Set {}, - "frameRendering": { - "clip": true, - "enabled": true, - "name": true, - "outline": true, - }, - "frameToHighlight": null, - "gridModeEnabled": false, - "gridSize": 20, - "gridStep": 5, - "height": 100, - "isBindingEnabled": true, - "isLoading": false, - "isResizing": false, - "isRotating": false, - "lastPointerDownWith": "mouse", - "multiElement": null, - "name": "Unbenannt-201933152653", - "newElement": null, - "objectsSnapModeEnabled": false, - "offsetLeft": 20, - "offsetTop": 10, - "openDialog": null, - "openMenu": null, - "openPopup": "elementBackground", - "openSidebar": null, - "originSnapOffset": null, - "pasteDialog": { - "data": null, - "shown": false, - }, - "penDetected": false, - "penMode": false, - "pendingImageElementId": null, - "previousSelectedElementIds": {}, - "resizingElement": null, - "scrollX": 0, - "scrollY": 0, - "scrolledOutside": false, - "selectedElementIds": { - "id1": true, - }, - "selectedElementsAreBeingDragged": false, - "selectedGroupIds": {}, - "selectedLinearElement": null, - "selectionElement": null, - "shouldCacheIgnoreZoom": false, - "showHyperlinkPopup": false, - "showWelcomeScreen": true, - "snapLines": [], - "startBoundElement": null, - "stats": { - "open": false, - "panels": 3, - }, - "suggestedBindings": [], - "theme": "light", - "toast": null, - "userToFollow": null, - "viewBackgroundColor": "#ffffff", - "viewModeEnabled": false, - "width": 200, - "zenModeEnabled": false, - "zoom": { - "value": 1, - }, -} -`; - -exports[`contextMenu element > selecting 'Paste styles' in context menu pastes styles > [end of test] element 0 1`] = ` -{ - "angle": 0, - "backgroundColor": "transparent", - "boundElements": null, - "customData": undefined, - "fillStyle": "solid", - "frameId": null, - "groupIds": [], - "height": 20, - "id": "id0", - "index": "a0", - "isDeleted": false, - "link": null, - "locked": false, - "opacity": 100, - "roughness": 1, - "roundness": { - "type": 3, - }, - "seed": 449462985, - "strokeColor": "#1e1e1e", - "strokeStyle": "solid", - "strokeWidth": 2, - "type": "rectangle", - "updated": 1, - "version": 3, - "versionNonce": 1150084233, - "width": 20, - "x": -10, - "y": 0, -} -`; - -exports[`contextMenu element > selecting 'Paste styles' in context menu pastes styles > [end of test] element 1 1`] = ` -{ - "angle": 0, - "backgroundColor": "#a5d8ff", - "boundElements": null, - "customData": undefined, - "fillStyle": "solid", - "frameId": null, - "groupIds": [], - "height": 20, - "id": "id1", - "index": "a1", - "isDeleted": false, - "link": null, - "locked": false, - "opacity": 100, - "roughness": 1, - "roundness": { - "type": 3, - }, - "seed": 1014066025, - "strokeColor": "#e03131", - "strokeStyle": "solid", - "strokeWidth": 2, - "type": "rectangle", - "updated": 1, - "version": 5, - "versionNonce": 915032327, - "width": 20, - "x": 20, - "y": 30, -} -`; - -exports[`contextMenu element > selecting 'Paste styles' in context menu pastes styles > [end of test] history 1`] = ` -History { - "onHistoryChangedEmitter": Emitter { - "subscribers": [ - [Function], - [Function], - ], - }, - "redoStack": [], - "undoStack": [ - HistoryEntry { - "appStateChange": AppStateChange { - "delta": Delta { - "deleted": { - "selectedElementIds": { - "id0": true, - }, - }, - "inserted": { - "selectedElementIds": {}, - }, - }, - }, - "elementsChange": ElementsChange { - "added": Map {}, - "removed": Map { - "id0" => Delta { - "deleted": { - "angle": 0, - "backgroundColor": "transparent", - "boundElements": null, - "customData": undefined, - "fillStyle": "solid", - "frameId": null, - "groupIds": [], - "height": 20, - "index": "a0", - "isDeleted": false, - "link": null, - "locked": false, - "opacity": 100, - "roughness": 1, - "roundness": { - "type": 3, - }, - "strokeColor": "#1e1e1e", - "strokeStyle": "solid", - "strokeWidth": 2, - "type": "rectangle", - "width": 20, - "x": -10, - "y": 0, - }, - "inserted": { - "isDeleted": true, - }, - }, - }, - "updated": Map {}, - }, - }, - HistoryEntry { - "appStateChange": AppStateChange { - "delta": Delta { - "deleted": { - "selectedElementIds": { - "id1": true, - }, - }, - "inserted": { - "selectedElementIds": { - "id0": true, - }, - }, - }, - }, - "elementsChange": ElementsChange { - "added": Map {}, - "removed": Map { - "id1" => Delta { - "deleted": { - "angle": 0, - "backgroundColor": "transparent", - "boundElements": null, - "customData": undefined, - "fillStyle": "solid", - "frameId": null, - "groupIds": [], - "height": 20, - "index": "a1", - "isDeleted": false, - "link": null, - "locked": false, - "opacity": 100, - "roughness": 1, - "roundness": { - "type": 3, - }, - "strokeColor": "#1e1e1e", - "strokeStyle": "solid", - "strokeWidth": 2, - "type": "rectangle", - "width": 20, - "x": 20, - "y": 30, - }, - "inserted": { - "isDeleted": true, - }, - }, - }, - "updated": Map {}, - }, - }, - HistoryEntry { - "appStateChange": AppStateChange { - "delta": Delta { - "deleted": {}, - "inserted": {}, - }, - }, - "elementsChange": ElementsChange { - "added": Map {}, - "removed": Map {}, - "updated": Map { - "id1" => Delta { - "deleted": { - "strokeColor": "#e03131", - }, - "inserted": { - "strokeColor": "#1e1e1e", - }, - }, - }, - }, - }, - HistoryEntry { - "appStateChange": AppStateChange { - "delta": Delta { - "deleted": {}, - "inserted": {}, - }, - }, - "elementsChange": ElementsChange { - "added": Map {}, - "removed": Map {}, - "updated": Map { - "id1" => Delta { - "deleted": { - "backgroundColor": "#a5d8ff", - }, - "inserted": { - "backgroundColor": "transparent", - }, - }, - }, - }, - }, - ], -} -`; - -exports[`contextMenu element > selecting 'Paste styles' in context menu pastes styles > [end of test] number of elements 1`] = `2`; - -exports[`contextMenu element > selecting 'Paste styles' in context menu pastes styles > [end of test] number of renders 1`] = `12`; - -exports[`contextMenu element > selecting 'Send backward' in context menu sends element backward > [end of test] appState 1`] = ` -{ - "activeEmbeddable": null, - "activeTool": { - "customType": null, - "lastActiveTool": null, - "locked": false, - "type": "selection", - }, - "collaborators": Map {}, - "contextMenu": { - "items": [ - "separator", - { - "icon": , - "keyTest": [Function], - "label": "labels.cut", - "name": "cut", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "icon": , - "keyTest": undefined, - "label": "labels.copy", - "name": "copy", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "keyTest": undefined, - "label": "labels.paste", - "name": "paste", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "label": "labels.selectAllElementsInFrame", - "name": "selectAllElementsInFrame", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "canvas", - }, - }, - { - "label": "labels.removeAllElementsFromFrame", - "name": "removeAllElementsFromFrame", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "history", - }, - }, - "separator", - { - "icon": , - "keyTest": [Function], - "keywords": [ - "png", - "clipboard", - "copy", - ], - "label": "labels.copyAsPng", - "name": "copyAsPng", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "icon": , - "keywords": [ - "svg", - "clipboard", - "copy", - ], - "label": "labels.copyAsSvg", - "name": "copyAsSvg", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "keywords": [ - "text", - "clipboard", - "copy", - ], - "label": "labels.copyText", - "name": "copyText", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", - }, - }, - "separator", - { - "icon": , - "keyTest": [Function], - "label": "labels.copyStyles", - "name": "copyStyles", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "icon": , - "keyTest": [Function], - "label": "labels.pasteStyles", - "name": "pasteStyles", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - "separator", - { - "PanelComponent": [Function], - "icon": [Function], - "keyTest": [Function], - "label": "labels.group", - "name": "group", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "icon": null, - "label": "labels.autoResize", - "name": "autoResize", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "label": "labels.unbindText", - "name": "unbindText", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "label": "labels.bindText", - "name": "bindText", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "label": "labels.createContainerFromText", - "name": "wrapTextInContainer", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "PanelComponent": [Function], - "icon": [Function], - "keyTest": [Function], - "label": "labels.ungroup", - "name": "ungroup", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", - }, - }, - "separator", - { - "label": "labels.addToLibrary", - "name": "addToLibrary", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - "separator", - { - "PanelComponent": [Function], - "icon": , - "keyPriority": 40, - "keyTest": [Function], - "keywords": [ - "move down", - "zindex", - "layer", - ], - "label": "labels.sendBackward", - "name": "sendBackward", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "PanelComponent": [Function], - "icon": , - "keyPriority": 40, - "keyTest": [Function], - "keywords": [ - "move up", - "zindex", - "layer", - ], - "label": "labels.bringForward", - "name": "bringForward", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "PanelComponent": [Function], - "icon": , - "keyTest": [Function], - "keywords": [ - "move down", - "zindex", - "layer", - ], - "label": "labels.sendToBack", - "name": "sendToBack", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "PanelComponent": [Function], - "icon": , - "keyTest": [Function], - "keywords": [ - "move up", - "zindex", - "layer", - ], - "label": "labels.bringToFront", - "name": "bringToFront", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - "separator", - { - "icon": , - "keyTest": [Function], - "label": "labels.flipHorizontal", - "name": "flipHorizontal", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "icon": , - "keyTest": [Function], - "label": "labels.flipVertical", - "name": "flipVertical", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - "separator", - { - "PanelComponent": [Function], - "category": "Elements", - "keywords": [ - "line", - ], - "label": [Function], - "name": "toggleLinearEditor", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "PanelComponent": [Function], - "icon": , - "keyTest": [Function], - "label": [Function], - "name": "hyperlink", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "action": "click", - "category": "hyperlink", - }, - }, - { - "PanelComponent": [Function], - "icon": , - "keyTest": [Function], - "label": "labels.duplicateSelection", - "name": "duplicateSelection", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "icon": [Function], - "keyTest": [Function], - "label": [Function], - "name": "toggleElementLock", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", + "contextMenu": null, + "currentChartType": "bar", + "currentHoveredFontFamily": null, + "currentItemArrowType": "round", + "currentItemBackgroundColor": "transparent", + "currentItemEndArrowhead": "arrow", + "currentItemFillStyle": "solid", + "currentItemFontFamily": 5, + "currentItemFontSize": 20, + "currentItemOpacity": 100, + "currentItemRoughness": 1, + "currentItemRoundness": "round", + "currentItemStartArrowhead": null, + "currentItemStrokeColor": "#1e1e1e", + "currentItemStrokeStyle": "solid", + "currentItemStrokeWidth": 2, + "currentItemTextAlign": "left", + "cursorButton": "up", + "defaultSidebarDockedPreference": false, + "editingElement": null, + "editingFrame": null, + "editingGroupId": null, + "editingLinearElement": null, + "elementsToHighlight": null, + "errorMessage": null, + "exportBackground": true, + "exportEmbedScene": false, + "exportScale": 1, + "exportWithDarkMode": false, + "featureFlagLibraryButton": false, + "featureFlagWelcomeScreen": false, + "fileHandle": null, + "followedBy": Set {}, + "frameRendering": { + "clip": true, + "enabled": true, + "name": true, + "outline": true, + }, + "frameToHighlight": null, + "gridModeEnabled": false, + "gridSize": 20, + "gridStep": 5, + "height": 100, + "isBindingEnabled": true, + "isLoading": false, + "isResizing": false, + "isRotating": false, + "lastPointerDownWith": "mouse", + "multiElement": null, + "name": "Unbenannt-201933152653", + "newElement": null, + "objectsSnapModeEnabled": false, + "offsetLeft": 20, + "offsetTop": 10, + "openDialog": null, + "openMenu": null, + "openPopup": null, + "openSidebar": null, + "originSnapOffset": null, + "pasteDialog": { + "data": null, + "shown": false, + }, + "penDetected": false, + "penMode": false, + "pendingImageElementId": null, + "previousSelectedElementIds": {}, + "resizingElement": null, + "scrollX": 0, + "scrollY": 0, + "scrolledOutside": false, + "selectedElementIds": { + "id0": true, + }, + "selectedElementsAreBeingDragged": false, + "selectedGroupIds": {}, + "selectedLinearElement": null, + "selectionElement": null, + "shouldCacheIgnoreZoom": false, + "showHyperlinkPopup": false, + "showWelcomeScreen": true, + "snapLines": [], + "startBoundElement": null, + "stats": { + "open": false, + "panels": 3, + }, + "suggestedBindings": [], + "theme": "light", + "toast": { + "message": "Zur Bibliothek hinzugefügt", + }, + "userToFollow": null, + "viewBackgroundColor": "#ffffff", + "viewModeEnabled": false, + "width": 200, + "zenModeEnabled": false, + "zoom": { + "value": 1, + }, +} +`; + +exports[`contextMenu element > selecting 'Add to library' in context menu adds element to library > [end of test] element 0 1`] = ` +{ + "angle": 0, + "backgroundColor": "transparent", + "boundElements": null, + "customData": undefined, + "fillStyle": "solid", + "frameId": null, + "groupIds": [], + "height": 20, + "id": "id0", + "index": "a0", + "isDeleted": false, + "link": null, + "locked": false, + "opacity": 100, + "roughness": 1, + "roundness": { + "type": 3, + }, + "seed": 449462985, + "strokeColor": "#1e1e1e", + "strokeStyle": "solid", + "strokeWidth": 2, + "type": "rectangle", + "updated": 1, + "version": 3, + "versionNonce": 1150084233, + "width": 20, + "x": -10, + "y": 0, +} +`; + +exports[`contextMenu element > selecting 'Add to library' in context menu adds element to library > [end of test] history 1`] = ` +History { + "onHistoryChangedEmitter": Emitter { + "subscribers": [ + [Function], + [Function], + ], + }, + "redoStack": [], + "undoStack": [ + HistoryEntry { + "appStateChange": AppStateChange { + "delta": Delta { + "deleted": { + "selectedElementIds": { + "id0": true, + }, + }, + "inserted": { + "selectedElementIds": {}, + }, }, }, - "separator", - { - "PanelComponent": [Function], - "icon": , - "keyTest": [Function], - "label": "labels.delete", - "name": "deleteSelectedElements", - "perform": [Function], - "trackEvent": { - "action": "delete", - "category": "element", + "elementsChange": ElementsChange { + "added": Map {}, + "removed": Map { + "id0" => Delta { + "deleted": { + "angle": 0, + "backgroundColor": "transparent", + "boundElements": null, + "customData": undefined, + "fillStyle": "solid", + "frameId": null, + "groupIds": [], + "height": 20, + "index": "a0", + "isDeleted": false, + "link": null, + "locked": false, + "opacity": 100, + "roughness": 1, + "roundness": { + "type": 3, + }, + "strokeColor": "#1e1e1e", + "strokeStyle": "solid", + "strokeWidth": 2, + "type": "rectangle", + "width": 20, + "x": -10, + "y": 0, + }, + "inserted": { + "isDeleted": true, + }, + }, }, + "updated": Map {}, }, - ], - "left": 20, - "top": 30, + }, + ], +} +`; + +exports[`contextMenu element > selecting 'Add to library' in context menu adds element to library > [end of test] number of elements 1`] = `1`; + +exports[`contextMenu element > selecting 'Add to library' in context menu adds element to library > [end of test] number of renders 1`] = `6`; + +exports[`contextMenu element > selecting 'Bring forward' in context menu brings element forward > [end of test] appState 1`] = ` +{ + "activeEmbeddable": null, + "activeTool": { + "customType": null, + "lastActiveTool": null, + "locked": false, + "type": "selection", }, + "collaborators": Map {}, + "contextMenu": null, "currentChartType": "bar", "currentHoveredFontFamily": null, "currentItemArrowType": "round", @@ -8714,7 +1290,7 @@ exports[`contextMenu element > selecting 'Send backward' in context menu sends e "scrollY": 0, "scrolledOutside": false, "selectedElementIds": { - "id1": true, + "id0": true, }, "selectedElementsAreBeingDragged": false, "selectedGroupIds": {}, @@ -8743,7 +1319,7 @@ exports[`contextMenu element > selecting 'Send backward' in context menu sends e } `; -exports[`contextMenu element > selecting 'Send backward' in context menu sends element backward > [end of test] element 0 1`] = ` +exports[`contextMenu element > selecting 'Bring forward' in context menu brings element forward > [end of test] element 0 1`] = ` { "angle": 0, "backgroundColor": "transparent", @@ -8753,8 +1329,8 @@ exports[`contextMenu element > selecting 'Send backward' in context menu sends e "frameId": null, "groupIds": [], "height": 20, - "id": "id0", - "index": "a0", + "id": "id1", + "index": "a1", "isDeleted": false, "link": null, "locked": false, @@ -8763,21 +1339,21 @@ exports[`contextMenu element > selecting 'Send backward' in context menu sends e "roundness": { "type": 3, }, - "seed": 449462985, + "seed": 1014066025, "strokeColor": "#1e1e1e", "strokeStyle": "solid", "strokeWidth": 2, "type": "rectangle", "updated": 1, "version": 3, - "versionNonce": 1150084233, + "versionNonce": 1604849351, "width": 20, - "x": -10, - "y": 0, + "x": 20, + "y": 30, } `; -exports[`contextMenu element > selecting 'Send backward' in context menu sends element backward > [end of test] element 1 1`] = ` +exports[`contextMenu element > selecting 'Bring forward' in context menu brings element forward > [end of test] element 1 1`] = ` { "angle": 0, "backgroundColor": "transparent", @@ -8787,8 +1363,8 @@ exports[`contextMenu element > selecting 'Send backward' in context menu sends e "frameId": null, "groupIds": [], "height": 20, - "id": "id1", - "index": "a1", + "id": "id0", + "index": "a2", "isDeleted": false, "link": null, "locked": false, @@ -8797,21 +1373,21 @@ exports[`contextMenu element > selecting 'Send backward' in context menu sends e "roundness": { "type": 3, }, - "seed": 1014066025, + "seed": 449462985, "strokeColor": "#1e1e1e", "strokeStyle": "solid", "strokeWidth": 2, "type": "rectangle", "updated": 1, - "version": 3, - "versionNonce": 1604849351, + "version": 4, + "versionNonce": 23633383, "width": 20, - "x": 20, - "y": 30, + "x": -10, + "y": 0, } `; -exports[`contextMenu element > selecting 'Send backward' in context menu sends element backward > [end of test] history 1`] = ` +exports[`contextMenu element > selecting 'Bring forward' in context menu brings element forward > [end of test] history 1`] = ` History { "onHistoryChangedEmitter": Emitter { "subscribers": [ @@ -8903,844 +1479,1553 @@ History { "index": "a1", "isDeleted": false, "link": null, - "locked": false, - "opacity": 100, - "roughness": 1, - "roundness": { - "type": 3, - }, - "strokeColor": "#1e1e1e", - "strokeStyle": "solid", - "strokeWidth": 2, - "type": "rectangle", - "width": 20, - "x": 20, - "y": 30, - }, - "inserted": { - "isDeleted": true, - }, - }, - }, - "updated": Map {}, - }, - }, - ], -} -`; - -exports[`contextMenu element > selecting 'Send backward' in context menu sends element backward > [end of test] number of elements 1`] = `2`; - -exports[`contextMenu element > selecting 'Send backward' in context menu sends element backward > [end of test] number of renders 1`] = `10`; - -exports[`contextMenu element > selecting 'Send to back' in context menu sends element to back > [end of test] appState 1`] = ` -{ - "activeEmbeddable": null, - "activeTool": { - "customType": null, - "lastActiveTool": null, - "locked": false, - "type": "selection", - }, - "collaborators": Map {}, - "contextMenu": { - "items": [ - "separator", - { - "icon": , - "keyTest": [Function], - "label": "labels.cut", - "name": "cut", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "icon": , - "keyTest": undefined, - "label": "labels.copy", - "name": "copy", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "keyTest": undefined, - "label": "labels.paste", - "name": "paste", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "label": "labels.selectAllElementsInFrame", - "name": "selectAllElementsInFrame", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "canvas", + "locked": false, + "opacity": 100, + "roughness": 1, + "roundness": { + "type": 3, + }, + "strokeColor": "#1e1e1e", + "strokeStyle": "solid", + "strokeWidth": 2, + "type": "rectangle", + "width": 20, + "x": 20, + "y": 30, + }, + "inserted": { + "isDeleted": true, + }, + }, }, + "updated": Map {}, }, - { - "label": "labels.removeAllElementsFromFrame", - "name": "removeAllElementsFromFrame", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "history", + }, + HistoryEntry { + "appStateChange": AppStateChange { + "delta": Delta { + "deleted": { + "selectedElementIds": { + "id0": true, + }, + }, + "inserted": { + "selectedElementIds": { + "id1": true, + }, + }, }, }, - "separator", - { - "icon": , - "keyTest": [Function], - "keywords": [ - "png", - "clipboard", - "copy", - ], - "label": "labels.copyAsPng", - "name": "copyAsPng", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", + "elementsChange": ElementsChange { + "added": Map {}, + "removed": Map {}, + "updated": Map { + "id0" => Delta { + "deleted": { + "index": "a2", + }, + "inserted": { + "index": "a0", + }, + }, }, }, - { - "icon": , - "keywords": [ - "svg", - "clipboard", - "copy", - ], - "label": "labels.copyAsSvg", - "name": "copyAsSvg", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", + }, + ], +} +`; + +exports[`contextMenu element > selecting 'Bring forward' in context menu brings element forward > [end of test] number of elements 1`] = `2`; + +exports[`contextMenu element > selecting 'Bring forward' in context menu brings element forward > [end of test] number of renders 1`] = `12`; + +exports[`contextMenu element > selecting 'Bring to front' in context menu brings element to front > [end of test] appState 1`] = ` +{ + "activeEmbeddable": null, + "activeTool": { + "customType": null, + "lastActiveTool": null, + "locked": false, + "type": "selection", + }, + "collaborators": Map {}, + "contextMenu": null, + "currentChartType": "bar", + "currentHoveredFontFamily": null, + "currentItemArrowType": "round", + "currentItemBackgroundColor": "transparent", + "currentItemEndArrowhead": "arrow", + "currentItemFillStyle": "solid", + "currentItemFontFamily": 5, + "currentItemFontSize": 20, + "currentItemOpacity": 100, + "currentItemRoughness": 1, + "currentItemRoundness": "round", + "currentItemStartArrowhead": null, + "currentItemStrokeColor": "#1e1e1e", + "currentItemStrokeStyle": "solid", + "currentItemStrokeWidth": 2, + "currentItemTextAlign": "left", + "cursorButton": "up", + "defaultSidebarDockedPreference": false, + "editingElement": null, + "editingFrame": null, + "editingGroupId": null, + "editingLinearElement": null, + "elementsToHighlight": null, + "errorMessage": null, + "exportBackground": true, + "exportEmbedScene": false, + "exportScale": 1, + "exportWithDarkMode": false, + "featureFlagLibraryButton": false, + "featureFlagWelcomeScreen": false, + "fileHandle": null, + "followedBy": Set {}, + "frameRendering": { + "clip": true, + "enabled": true, + "name": true, + "outline": true, + }, + "frameToHighlight": null, + "gridModeEnabled": false, + "gridSize": 20, + "gridStep": 5, + "height": 100, + "isBindingEnabled": true, + "isLoading": false, + "isResizing": false, + "isRotating": false, + "lastPointerDownWith": "mouse", + "multiElement": null, + "name": "Unbenannt-201933152653", + "newElement": null, + "objectsSnapModeEnabled": false, + "offsetLeft": 20, + "offsetTop": 10, + "openDialog": null, + "openMenu": null, + "openPopup": null, + "openSidebar": null, + "originSnapOffset": null, + "pasteDialog": { + "data": null, + "shown": false, + }, + "penDetected": false, + "penMode": false, + "pendingImageElementId": null, + "previousSelectedElementIds": {}, + "resizingElement": null, + "scrollX": 0, + "scrollY": 0, + "scrolledOutside": false, + "selectedElementIds": { + "id0": true, + }, + "selectedElementsAreBeingDragged": false, + "selectedGroupIds": {}, + "selectedLinearElement": null, + "selectionElement": null, + "shouldCacheIgnoreZoom": false, + "showHyperlinkPopup": false, + "showWelcomeScreen": true, + "snapLines": [], + "startBoundElement": null, + "stats": { + "open": false, + "panels": 3, + }, + "suggestedBindings": [], + "theme": "light", + "toast": null, + "userToFollow": null, + "viewBackgroundColor": "#ffffff", + "viewModeEnabled": false, + "width": 200, + "zenModeEnabled": false, + "zoom": { + "value": 1, + }, +} +`; + +exports[`contextMenu element > selecting 'Bring to front' in context menu brings element to front > [end of test] element 0 1`] = ` +{ + "angle": 0, + "backgroundColor": "transparent", + "boundElements": null, + "customData": undefined, + "fillStyle": "solid", + "frameId": null, + "groupIds": [], + "height": 20, + "id": "id1", + "index": "a1", + "isDeleted": false, + "link": null, + "locked": false, + "opacity": 100, + "roughness": 1, + "roundness": { + "type": 3, + }, + "seed": 1014066025, + "strokeColor": "#1e1e1e", + "strokeStyle": "solid", + "strokeWidth": 2, + "type": "rectangle", + "updated": 1, + "version": 3, + "versionNonce": 1604849351, + "width": 20, + "x": 20, + "y": 30, +} +`; + +exports[`contextMenu element > selecting 'Bring to front' in context menu brings element to front > [end of test] element 1 1`] = ` +{ + "angle": 0, + "backgroundColor": "transparent", + "boundElements": null, + "customData": undefined, + "fillStyle": "solid", + "frameId": null, + "groupIds": [], + "height": 20, + "id": "id0", + "index": "a2", + "isDeleted": false, + "link": null, + "locked": false, + "opacity": 100, + "roughness": 1, + "roundness": { + "type": 3, + }, + "seed": 449462985, + "strokeColor": "#1e1e1e", + "strokeStyle": "solid", + "strokeWidth": 2, + "type": "rectangle", + "updated": 1, + "version": 4, + "versionNonce": 23633383, + "width": 20, + "x": -10, + "y": 0, +} +`; + +exports[`contextMenu element > selecting 'Bring to front' in context menu brings element to front > [end of test] history 1`] = ` +History { + "onHistoryChangedEmitter": Emitter { + "subscribers": [ + [Function], + [Function], + ], + }, + "redoStack": [], + "undoStack": [ + HistoryEntry { + "appStateChange": AppStateChange { + "delta": Delta { + "deleted": { + "selectedElementIds": { + "id0": true, + }, + }, + "inserted": { + "selectedElementIds": {}, + }, }, }, - { - "keywords": [ - "text", - "clipboard", - "copy", - ], - "label": "labels.copyText", - "name": "copyText", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", + "elementsChange": ElementsChange { + "added": Map {}, + "removed": Map { + "id0" => Delta { + "deleted": { + "angle": 0, + "backgroundColor": "transparent", + "boundElements": null, + "customData": undefined, + "fillStyle": "solid", + "frameId": null, + "groupIds": [], + "height": 20, + "index": "a0", + "isDeleted": false, + "link": null, + "locked": false, + "opacity": 100, + "roughness": 1, + "roundness": { + "type": 3, + }, + "strokeColor": "#1e1e1e", + "strokeStyle": "solid", + "strokeWidth": 2, + "type": "rectangle", + "width": 20, + "x": -10, + "y": 0, + }, + "inserted": { + "isDeleted": true, + }, + }, }, + "updated": Map {}, }, - "separator", - { - "icon": , - "keyTest": [Function], - "label": "labels.copyStyles", - "name": "copyStyles", - "perform": [Function], - "trackEvent": { - "category": "element", + }, + HistoryEntry { + "appStateChange": AppStateChange { + "delta": Delta { + "deleted": { + "selectedElementIds": { + "id1": true, + }, + }, + "inserted": { + "selectedElementIds": { + "id0": true, + }, + }, }, }, - { - "icon": , - "keyTest": [Function], - "label": "labels.pasteStyles", - "name": "pasteStyles", - "perform": [Function], - "trackEvent": { - "category": "element", + "elementsChange": ElementsChange { + "added": Map {}, + "removed": Map { + "id1" => Delta { + "deleted": { + "angle": 0, + "backgroundColor": "transparent", + "boundElements": null, + "customData": undefined, + "fillStyle": "solid", + "frameId": null, + "groupIds": [], + "height": 20, + "index": "a1", + "isDeleted": false, + "link": null, + "locked": false, + "opacity": 100, + "roughness": 1, + "roundness": { + "type": 3, + }, + "strokeColor": "#1e1e1e", + "strokeStyle": "solid", + "strokeWidth": 2, + "type": "rectangle", + "width": 20, + "x": 20, + "y": 30, + }, + "inserted": { + "isDeleted": true, + }, + }, }, + "updated": Map {}, }, - "separator", - { - "PanelComponent": [Function], - "icon": [Function], - "keyTest": [Function], - "label": "labels.group", - "name": "group", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", + }, + HistoryEntry { + "appStateChange": AppStateChange { + "delta": Delta { + "deleted": { + "selectedElementIds": { + "id0": true, + }, + }, + "inserted": { + "selectedElementIds": { + "id1": true, + }, + }, }, }, - { - "icon": null, - "label": "labels.autoResize", - "name": "autoResize", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", + "elementsChange": ElementsChange { + "added": Map {}, + "removed": Map {}, + "updated": Map { + "id0" => Delta { + "deleted": { + "index": "a2", + }, + "inserted": { + "index": "a0", + }, + }, }, }, - { - "label": "labels.unbindText", - "name": "unbindText", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", + }, + ], +} +`; + +exports[`contextMenu element > selecting 'Bring to front' in context menu brings element to front > [end of test] number of elements 1`] = `2`; + +exports[`contextMenu element > selecting 'Bring to front' in context menu brings element to front > [end of test] number of renders 1`] = `12`; + +exports[`contextMenu element > selecting 'Copy styles' in context menu copies styles > [end of test] appState 1`] = ` +{ + "activeEmbeddable": null, + "activeTool": { + "customType": null, + "lastActiveTool": null, + "locked": false, + "type": "selection", + }, + "collaborators": Map {}, + "contextMenu": null, + "currentChartType": "bar", + "currentHoveredFontFamily": null, + "currentItemArrowType": "round", + "currentItemBackgroundColor": "transparent", + "currentItemEndArrowhead": "arrow", + "currentItemFillStyle": "solid", + "currentItemFontFamily": 5, + "currentItemFontSize": 20, + "currentItemOpacity": 100, + "currentItemRoughness": 1, + "currentItemRoundness": "round", + "currentItemStartArrowhead": null, + "currentItemStrokeColor": "#1e1e1e", + "currentItemStrokeStyle": "solid", + "currentItemStrokeWidth": 2, + "currentItemTextAlign": "left", + "cursorButton": "up", + "defaultSidebarDockedPreference": false, + "editingElement": null, + "editingFrame": null, + "editingGroupId": null, + "editingLinearElement": null, + "elementsToHighlight": null, + "errorMessage": null, + "exportBackground": true, + "exportEmbedScene": false, + "exportScale": 1, + "exportWithDarkMode": false, + "featureFlagLibraryButton": false, + "featureFlagWelcomeScreen": false, + "fileHandle": null, + "followedBy": Set {}, + "frameRendering": { + "clip": true, + "enabled": true, + "name": true, + "outline": true, + }, + "frameToHighlight": null, + "gridModeEnabled": false, + "gridSize": 20, + "gridStep": 5, + "height": 100, + "isBindingEnabled": true, + "isLoading": false, + "isResizing": false, + "isRotating": false, + "lastPointerDownWith": "mouse", + "multiElement": null, + "name": "Unbenannt-201933152653", + "newElement": null, + "objectsSnapModeEnabled": false, + "offsetLeft": 20, + "offsetTop": 10, + "openDialog": null, + "openMenu": null, + "openPopup": null, + "openSidebar": null, + "originSnapOffset": null, + "pasteDialog": { + "data": null, + "shown": false, + }, + "penDetected": false, + "penMode": false, + "pendingImageElementId": null, + "previousSelectedElementIds": {}, + "resizingElement": null, + "scrollX": 0, + "scrollY": 0, + "scrolledOutside": false, + "selectedElementIds": { + "id0": true, + }, + "selectedElementsAreBeingDragged": false, + "selectedGroupIds": {}, + "selectedLinearElement": null, + "selectionElement": null, + "shouldCacheIgnoreZoom": false, + "showHyperlinkPopup": false, + "showWelcomeScreen": true, + "snapLines": [], + "startBoundElement": null, + "stats": { + "open": false, + "panels": 3, + }, + "suggestedBindings": [], + "theme": "light", + "toast": { + "message": "Formatierungen kopiert.", + }, + "userToFollow": null, + "viewBackgroundColor": "#ffffff", + "viewModeEnabled": false, + "width": 200, + "zenModeEnabled": false, + "zoom": { + "value": 1, + }, +} +`; + +exports[`contextMenu element > selecting 'Copy styles' in context menu copies styles > [end of test] element 0 1`] = ` +{ + "angle": 0, + "backgroundColor": "transparent", + "boundElements": null, + "customData": undefined, + "fillStyle": "solid", + "frameId": null, + "groupIds": [], + "height": 20, + "id": "id0", + "index": "a0", + "isDeleted": false, + "link": null, + "locked": false, + "opacity": 100, + "roughness": 1, + "roundness": { + "type": 3, + }, + "seed": 449462985, + "strokeColor": "#1e1e1e", + "strokeStyle": "solid", + "strokeWidth": 2, + "type": "rectangle", + "updated": 1, + "version": 3, + "versionNonce": 1150084233, + "width": 20, + "x": -10, + "y": 0, +} +`; + +exports[`contextMenu element > selecting 'Copy styles' in context menu copies styles > [end of test] history 1`] = ` +History { + "onHistoryChangedEmitter": Emitter { + "subscribers": [ + [Function], + [Function], + ], + }, + "redoStack": [], + "undoStack": [ + HistoryEntry { + "appStateChange": AppStateChange { + "delta": Delta { + "deleted": { + "selectedElementIds": { + "id0": true, + }, + }, + "inserted": { + "selectedElementIds": {}, + }, }, }, - { - "label": "labels.bindText", - "name": "bindText", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", + "elementsChange": ElementsChange { + "added": Map {}, + "removed": Map { + "id0" => Delta { + "deleted": { + "angle": 0, + "backgroundColor": "transparent", + "boundElements": null, + "customData": undefined, + "fillStyle": "solid", + "frameId": null, + "groupIds": [], + "height": 20, + "index": "a0", + "isDeleted": false, + "link": null, + "locked": false, + "opacity": 100, + "roughness": 1, + "roundness": { + "type": 3, + }, + "strokeColor": "#1e1e1e", + "strokeStyle": "solid", + "strokeWidth": 2, + "type": "rectangle", + "width": 20, + "x": -10, + "y": 0, + }, + "inserted": { + "isDeleted": true, + }, + }, }, + "updated": Map {}, }, - { - "label": "labels.createContainerFromText", - "name": "wrapTextInContainer", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", + }, + ], +} +`; + +exports[`contextMenu element > selecting 'Copy styles' in context menu copies styles > [end of test] number of elements 1`] = `1`; + +exports[`contextMenu element > selecting 'Copy styles' in context menu copies styles > [end of test] number of renders 1`] = `6`; + +exports[`contextMenu element > selecting 'Delete' in context menu deletes element > [end of test] appState 1`] = ` +{ + "activeEmbeddable": null, + "activeTool": { + "customType": null, + "lastActiveTool": null, + "locked": false, + "type": "selection", + }, + "collaborators": Map {}, + "contextMenu": null, + "currentChartType": "bar", + "currentHoveredFontFamily": null, + "currentItemArrowType": "round", + "currentItemBackgroundColor": "transparent", + "currentItemEndArrowhead": "arrow", + "currentItemFillStyle": "solid", + "currentItemFontFamily": 5, + "currentItemFontSize": 20, + "currentItemOpacity": 100, + "currentItemRoughness": 1, + "currentItemRoundness": "round", + "currentItemStartArrowhead": null, + "currentItemStrokeColor": "#1e1e1e", + "currentItemStrokeStyle": "solid", + "currentItemStrokeWidth": 2, + "currentItemTextAlign": "left", + "cursorButton": "up", + "defaultSidebarDockedPreference": false, + "editingElement": null, + "editingFrame": null, + "editingGroupId": null, + "editingLinearElement": null, + "elementsToHighlight": null, + "errorMessage": null, + "exportBackground": true, + "exportEmbedScene": false, + "exportScale": 1, + "exportWithDarkMode": false, + "featureFlagLibraryButton": false, + "featureFlagWelcomeScreen": false, + "fileHandle": null, + "followedBy": Set {}, + "frameRendering": { + "clip": true, + "enabled": true, + "name": true, + "outline": true, + }, + "frameToHighlight": null, + "gridModeEnabled": false, + "gridSize": 20, + "gridStep": 5, + "height": 100, + "isBindingEnabled": true, + "isLoading": false, + "isResizing": false, + "isRotating": false, + "lastPointerDownWith": "mouse", + "multiElement": null, + "name": "Unbenannt-201933152653", + "newElement": null, + "objectsSnapModeEnabled": false, + "offsetLeft": 20, + "offsetTop": 10, + "openDialog": null, + "openMenu": null, + "openPopup": null, + "openSidebar": null, + "originSnapOffset": null, + "pasteDialog": { + "data": null, + "shown": false, + }, + "penDetected": false, + "penMode": false, + "pendingImageElementId": null, + "previousSelectedElementIds": {}, + "resizingElement": null, + "scrollX": 0, + "scrollY": 0, + "scrolledOutside": false, + "selectedElementIds": {}, + "selectedElementsAreBeingDragged": false, + "selectedGroupIds": {}, + "selectedLinearElement": null, + "selectionElement": null, + "shouldCacheIgnoreZoom": false, + "showHyperlinkPopup": false, + "showWelcomeScreen": true, + "snapLines": [], + "startBoundElement": null, + "stats": { + "open": false, + "panels": 3, + }, + "suggestedBindings": [], + "theme": "light", + "toast": null, + "userToFollow": null, + "viewBackgroundColor": "#ffffff", + "viewModeEnabled": false, + "width": 200, + "zenModeEnabled": false, + "zoom": { + "value": 1, + }, +} +`; + +exports[`contextMenu element > selecting 'Delete' in context menu deletes element > [end of test] element 0 1`] = ` +{ + "angle": 0, + "backgroundColor": "transparent", + "boundElements": null, + "customData": undefined, + "fillStyle": "solid", + "frameId": null, + "groupIds": [], + "height": 20, + "id": "id0", + "index": "a0", + "isDeleted": true, + "link": null, + "locked": false, + "opacity": 100, + "roughness": 1, + "roundness": { + "type": 3, + }, + "seed": 449462985, + "strokeColor": "#1e1e1e", + "strokeStyle": "solid", + "strokeWidth": 2, + "type": "rectangle", + "updated": 1, + "version": 4, + "versionNonce": 1014066025, + "width": 20, + "x": -10, + "y": 0, +} +`; + +exports[`contextMenu element > selecting 'Delete' in context menu deletes element > [end of test] history 1`] = ` +History { + "onHistoryChangedEmitter": Emitter { + "subscribers": [ + [Function], + [Function], + ], + }, + "redoStack": [], + "undoStack": [ + HistoryEntry { + "appStateChange": AppStateChange { + "delta": Delta { + "deleted": { + "selectedElementIds": { + "id0": true, + }, + }, + "inserted": { + "selectedElementIds": {}, + }, }, }, - { - "PanelComponent": [Function], - "icon": [Function], - "keyTest": [Function], - "label": "labels.ungroup", - "name": "ungroup", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", + "elementsChange": ElementsChange { + "added": Map {}, + "removed": Map { + "id0" => Delta { + "deleted": { + "angle": 0, + "backgroundColor": "transparent", + "boundElements": null, + "customData": undefined, + "fillStyle": "solid", + "frameId": null, + "groupIds": [], + "height": 20, + "index": "a0", + "isDeleted": false, + "link": null, + "locked": false, + "opacity": 100, + "roughness": 1, + "roundness": { + "type": 3, + }, + "strokeColor": "#1e1e1e", + "strokeStyle": "solid", + "strokeWidth": 2, + "type": "rectangle", + "width": 20, + "x": -10, + "y": 0, + }, + "inserted": { + "isDeleted": true, + }, + }, }, + "updated": Map {}, }, - "separator", - { - "label": "labels.addToLibrary", - "name": "addToLibrary", - "perform": [Function], - "trackEvent": { - "category": "element", + }, + HistoryEntry { + "appStateChange": AppStateChange { + "delta": Delta { + "deleted": { + "selectedElementIds": {}, + }, + "inserted": { + "selectedElementIds": { + "id0": true, + }, + }, }, }, - "separator", - { - "PanelComponent": [Function], - "icon": , - "keyPriority": 40, - "keyTest": [Function], - "keywords": [ - "move down", - "zindex", - "layer", - ], - "label": "labels.sendBackward", - "name": "sendBackward", - "perform": [Function], - "trackEvent": { - "category": "element", + "elementsChange": ElementsChange { + "added": Map { + "id0" => Delta { + "deleted": { + "isDeleted": true, + }, + "inserted": { + "isDeleted": false, + }, + }, + }, + "removed": Map {}, + "updated": Map {}, + }, + }, + ], +} +`; + +exports[`contextMenu element > selecting 'Delete' in context menu deletes element > [end of test] number of elements 1`] = `1`; + +exports[`contextMenu element > selecting 'Delete' in context menu deletes element > [end of test] number of renders 1`] = `7`; + +exports[`contextMenu element > selecting 'Duplicate' in context menu duplicates element > [end of test] appState 1`] = ` +{ + "activeEmbeddable": null, + "activeTool": { + "customType": null, + "lastActiveTool": null, + "locked": false, + "type": "selection", + }, + "collaborators": Map {}, + "contextMenu": null, + "currentChartType": "bar", + "currentHoveredFontFamily": null, + "currentItemArrowType": "round", + "currentItemBackgroundColor": "transparent", + "currentItemEndArrowhead": "arrow", + "currentItemFillStyle": "solid", + "currentItemFontFamily": 5, + "currentItemFontSize": 20, + "currentItemOpacity": 100, + "currentItemRoughness": 1, + "currentItemRoundness": "round", + "currentItemStartArrowhead": null, + "currentItemStrokeColor": "#1e1e1e", + "currentItemStrokeStyle": "solid", + "currentItemStrokeWidth": 2, + "currentItemTextAlign": "left", + "cursorButton": "up", + "defaultSidebarDockedPreference": false, + "editingElement": null, + "editingFrame": null, + "editingGroupId": null, + "editingLinearElement": null, + "elementsToHighlight": null, + "errorMessage": null, + "exportBackground": true, + "exportEmbedScene": false, + "exportScale": 1, + "exportWithDarkMode": false, + "featureFlagLibraryButton": false, + "featureFlagWelcomeScreen": false, + "fileHandle": null, + "followedBy": Set {}, + "frameRendering": { + "clip": true, + "enabled": true, + "name": true, + "outline": true, + }, + "frameToHighlight": null, + "gridModeEnabled": false, + "gridSize": 20, + "gridStep": 5, + "height": 100, + "isBindingEnabled": true, + "isLoading": false, + "isResizing": false, + "isRotating": false, + "lastPointerDownWith": "mouse", + "multiElement": null, + "name": "Unbenannt-201933152653", + "newElement": null, + "objectsSnapModeEnabled": false, + "offsetLeft": 20, + "offsetTop": 10, + "openDialog": null, + "openMenu": null, + "openPopup": null, + "openSidebar": null, + "originSnapOffset": null, + "pasteDialog": { + "data": null, + "shown": false, + }, + "penDetected": false, + "penMode": false, + "pendingImageElementId": null, + "previousSelectedElementIds": {}, + "resizingElement": null, + "scrollX": 0, + "scrollY": 0, + "scrolledOutside": false, + "selectedElementIds": { + "id0_copy": true, + }, + "selectedElementsAreBeingDragged": false, + "selectedGroupIds": {}, + "selectedLinearElement": null, + "selectionElement": null, + "shouldCacheIgnoreZoom": false, + "showHyperlinkPopup": false, + "showWelcomeScreen": true, + "snapLines": [], + "startBoundElement": null, + "stats": { + "open": false, + "panels": 3, + }, + "suggestedBindings": [], + "theme": "light", + "toast": null, + "userToFollow": null, + "viewBackgroundColor": "#ffffff", + "viewModeEnabled": false, + "width": 200, + "zenModeEnabled": false, + "zoom": { + "value": 1, + }, +} +`; + +exports[`contextMenu element > selecting 'Duplicate' in context menu duplicates element > [end of test] element 0 1`] = ` +{ + "angle": 0, + "backgroundColor": "transparent", + "boundElements": null, + "customData": undefined, + "fillStyle": "solid", + "frameId": null, + "groupIds": [], + "height": 20, + "id": "id0", + "index": "a0", + "isDeleted": false, + "link": null, + "locked": false, + "opacity": 100, + "roughness": 1, + "roundness": { + "type": 3, + }, + "seed": 449462985, + "strokeColor": "#1e1e1e", + "strokeStyle": "solid", + "strokeWidth": 2, + "type": "rectangle", + "updated": 1, + "version": 3, + "versionNonce": 1150084233, + "width": 20, + "x": -10, + "y": 0, +} +`; + +exports[`contextMenu element > selecting 'Duplicate' in context menu duplicates element > [end of test] element 1 1`] = ` +{ + "angle": 0, + "backgroundColor": "transparent", + "boundElements": null, + "customData": undefined, + "fillStyle": "solid", + "frameId": null, + "groupIds": [], + "height": 20, + "id": "id0_copy", + "index": "a1", + "isDeleted": false, + "link": null, + "locked": false, + "opacity": 100, + "roughness": 1, + "roundness": { + "type": 3, + }, + "seed": 1014066025, + "strokeColor": "#1e1e1e", + "strokeStyle": "solid", + "strokeWidth": 2, + "type": "rectangle", + "updated": 1, + "version": 4, + "versionNonce": 238820263, + "width": 20, + "x": 0, + "y": 10, +} +`; + +exports[`contextMenu element > selecting 'Duplicate' in context menu duplicates element > [end of test] history 1`] = ` +History { + "onHistoryChangedEmitter": Emitter { + "subscribers": [ + [Function], + [Function], + ], + }, + "redoStack": [], + "undoStack": [ + HistoryEntry { + "appStateChange": AppStateChange { + "delta": Delta { + "deleted": { + "selectedElementIds": { + "id0": true, + }, + }, + "inserted": { + "selectedElementIds": {}, + }, }, }, - { - "PanelComponent": [Function], - "icon": , - "keyPriority": 40, - "keyTest": [Function], - "keywords": [ - "move up", - "zindex", - "layer", - ], - "label": "labels.bringForward", - "name": "bringForward", - "perform": [Function], - "trackEvent": { - "category": "element", + "elementsChange": ElementsChange { + "added": Map {}, + "removed": Map { + "id0" => Delta { + "deleted": { + "angle": 0, + "backgroundColor": "transparent", + "boundElements": null, + "customData": undefined, + "fillStyle": "solid", + "frameId": null, + "groupIds": [], + "height": 20, + "index": "a0", + "isDeleted": false, + "link": null, + "locked": false, + "opacity": 100, + "roughness": 1, + "roundness": { + "type": 3, + }, + "strokeColor": "#1e1e1e", + "strokeStyle": "solid", + "strokeWidth": 2, + "type": "rectangle", + "width": 20, + "x": -10, + "y": 0, + }, + "inserted": { + "isDeleted": true, + }, + }, }, + "updated": Map {}, }, - { - "PanelComponent": [Function], - "icon": , - "keyTest": [Function], - "keywords": [ - "move down", - "zindex", - "layer", - ], - "label": "labels.sendToBack", - "name": "sendToBack", - "perform": [Function], - "trackEvent": { - "category": "element", + }, + HistoryEntry { + "appStateChange": AppStateChange { + "delta": Delta { + "deleted": { + "selectedElementIds": { + "id0_copy": true, + }, + }, + "inserted": { + "selectedElementIds": { + "id0": true, + }, + }, }, }, - { - "PanelComponent": [Function], - "icon": , - "keyTest": [Function], - "keywords": [ - "move up", - "zindex", - "layer", - ], - "label": "labels.bringToFront", - "name": "bringToFront", - "perform": [Function], - "trackEvent": { - "category": "element", + "elementsChange": ElementsChange { + "added": Map {}, + "removed": Map { + "id0_copy" => Delta { + "deleted": { + "angle": 0, + "backgroundColor": "transparent", + "boundElements": null, + "customData": undefined, + "fillStyle": "solid", + "frameId": null, + "groupIds": [], + "height": 20, + "index": "a1", + "isDeleted": false, + "link": null, + "locked": false, + "opacity": 100, + "roughness": 1, + "roundness": { + "type": 3, + }, + "strokeColor": "#1e1e1e", + "strokeStyle": "solid", + "strokeWidth": 2, + "type": "rectangle", + "width": 20, + "x": 0, + "y": 10, + }, + "inserted": { + "isDeleted": true, + }, + }, }, + "updated": Map {}, }, - "separator", - { - "icon": , - "keyTest": [Function], - "label": "labels.flipHorizontal", - "name": "flipHorizontal", - "perform": [Function], - "trackEvent": { - "category": "element", + }, + ], +} +`; + +exports[`contextMenu element > selecting 'Duplicate' in context menu duplicates element > [end of test] number of elements 1`] = `2`; + +exports[`contextMenu element > selecting 'Duplicate' in context menu duplicates element > [end of test] number of renders 1`] = `7`; + +exports[`contextMenu element > selecting 'Group selection' in context menu groups selected elements > [end of test] appState 1`] = ` +{ + "activeEmbeddable": null, + "activeTool": { + "customType": null, + "lastActiveTool": null, + "locked": false, + "type": "selection", + }, + "collaborators": Map {}, + "contextMenu": null, + "currentChartType": "bar", + "currentHoveredFontFamily": null, + "currentItemArrowType": "round", + "currentItemBackgroundColor": "transparent", + "currentItemEndArrowhead": "arrow", + "currentItemFillStyle": "solid", + "currentItemFontFamily": 5, + "currentItemFontSize": 20, + "currentItemOpacity": 100, + "currentItemRoughness": 1, + "currentItemRoundness": "round", + "currentItemStartArrowhead": null, + "currentItemStrokeColor": "#1e1e1e", + "currentItemStrokeStyle": "solid", + "currentItemStrokeWidth": 2, + "currentItemTextAlign": "left", + "cursorButton": "up", + "defaultSidebarDockedPreference": false, + "editingElement": null, + "editingFrame": null, + "editingGroupId": null, + "editingLinearElement": null, + "elementsToHighlight": null, + "errorMessage": null, + "exportBackground": true, + "exportEmbedScene": false, + "exportScale": 1, + "exportWithDarkMode": false, + "featureFlagLibraryButton": false, + "featureFlagWelcomeScreen": false, + "fileHandle": null, + "followedBy": Set {}, + "frameRendering": { + "clip": true, + "enabled": true, + "name": true, + "outline": true, + }, + "frameToHighlight": null, + "gridModeEnabled": false, + "gridSize": 20, + "gridStep": 5, + "height": 100, + "isBindingEnabled": true, + "isLoading": false, + "isResizing": false, + "isRotating": false, + "lastPointerDownWith": "mouse", + "multiElement": null, + "name": "Unbenannt-201933152653", + "newElement": null, + "objectsSnapModeEnabled": false, + "offsetLeft": 20, + "offsetTop": 10, + "openDialog": null, + "openMenu": null, + "openPopup": null, + "openSidebar": null, + "originSnapOffset": null, + "pasteDialog": { + "data": null, + "shown": false, + }, + "penDetected": false, + "penMode": false, + "pendingImageElementId": null, + "previousSelectedElementIds": { + "id1": true, + }, + "resizingElement": null, + "scrollX": 0, + "scrollY": 0, + "scrolledOutside": false, + "selectedElementIds": { + "id0": true, + "id1": true, + }, + "selectedElementsAreBeingDragged": false, + "selectedGroupIds": { + "id3": true, + }, + "selectedLinearElement": null, + "selectionElement": null, + "shouldCacheIgnoreZoom": false, + "showHyperlinkPopup": false, + "showWelcomeScreen": true, + "snapLines": [], + "startBoundElement": null, + "stats": { + "open": false, + "panels": 3, + }, + "suggestedBindings": [], + "theme": "light", + "toast": null, + "userToFollow": null, + "viewBackgroundColor": "#ffffff", + "viewModeEnabled": false, + "width": 200, + "zenModeEnabled": false, + "zoom": { + "value": 1, + }, +} +`; + +exports[`contextMenu element > selecting 'Group selection' in context menu groups selected elements > [end of test] element 0 1`] = ` +{ + "angle": 0, + "backgroundColor": "transparent", + "boundElements": null, + "customData": undefined, + "fillStyle": "solid", + "frameId": null, + "groupIds": [ + "id3", + ], + "height": 20, + "id": "id0", + "index": "a0", + "isDeleted": false, + "link": null, + "locked": false, + "opacity": 100, + "roughness": 1, + "roundness": { + "type": 3, + }, + "seed": 449462985, + "strokeColor": "#1e1e1e", + "strokeStyle": "solid", + "strokeWidth": 2, + "type": "rectangle", + "updated": 1, + "version": 4, + "versionNonce": 493213705, + "width": 20, + "x": -10, + "y": 0, +} +`; + +exports[`contextMenu element > selecting 'Group selection' in context menu groups selected elements > [end of test] element 1 1`] = ` +{ + "angle": 0, + "backgroundColor": "transparent", + "boundElements": null, + "customData": undefined, + "fillStyle": "solid", + "frameId": null, + "groupIds": [ + "id3", + ], + "height": 20, + "id": "id1", + "index": "a1", + "isDeleted": false, + "link": null, + "locked": false, + "opacity": 100, + "roughness": 1, + "roundness": { + "type": 3, + }, + "seed": 1014066025, + "strokeColor": "#1e1e1e", + "strokeStyle": "solid", + "strokeWidth": 2, + "type": "rectangle", + "updated": 1, + "version": 4, + "versionNonce": 915032327, + "width": 20, + "x": 20, + "y": 30, +} +`; + +exports[`contextMenu element > selecting 'Group selection' in context menu groups selected elements > [end of test] history 1`] = ` +History { + "onHistoryChangedEmitter": Emitter { + "subscribers": [ + [Function], + [Function], + ], + }, + "redoStack": [], + "undoStack": [ + HistoryEntry { + "appStateChange": AppStateChange { + "delta": Delta { + "deleted": { + "selectedElementIds": { + "id0": true, + }, + }, + "inserted": { + "selectedElementIds": {}, + }, }, }, - { - "icon": , - "keyTest": [Function], - "label": "labels.flipVertical", - "name": "flipVertical", - "perform": [Function], - "trackEvent": { - "category": "element", + "elementsChange": ElementsChange { + "added": Map {}, + "removed": Map { + "id0" => Delta { + "deleted": { + "angle": 0, + "backgroundColor": "transparent", + "boundElements": null, + "customData": undefined, + "fillStyle": "solid", + "frameId": null, + "groupIds": [], + "height": 20, + "index": "a0", + "isDeleted": false, + "link": null, + "locked": false, + "opacity": 100, + "roughness": 1, + "roundness": { + "type": 3, + }, + "strokeColor": "#1e1e1e", + "strokeStyle": "solid", + "strokeWidth": 2, + "type": "rectangle", + "width": 20, + "x": -10, + "y": 0, + }, + "inserted": { + "isDeleted": true, + }, + }, }, + "updated": Map {}, }, - "separator", - { - "PanelComponent": [Function], - "category": "Elements", - "keywords": [ - "line", - ], - "label": [Function], - "name": "toggleLinearEditor", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", + }, + HistoryEntry { + "appStateChange": AppStateChange { + "delta": Delta { + "deleted": { + "selectedElementIds": { + "id1": true, + }, + }, + "inserted": { + "selectedElementIds": { + "id0": true, + }, + }, }, }, - { - "PanelComponent": [Function], - "icon": , - "keyTest": [Function], - "label": [Function], - "name": "hyperlink", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "action": "click", - "category": "hyperlink", + "elementsChange": ElementsChange { + "added": Map {}, + "removed": Map { + "id1" => Delta { + "deleted": { + "angle": 0, + "backgroundColor": "transparent", + "boundElements": null, + "customData": undefined, + "fillStyle": "solid", + "frameId": null, + "groupIds": [], + "height": 20, + "index": "a1", + "isDeleted": false, + "link": null, + "locked": false, + "opacity": 100, + "roughness": 1, + "roundness": { + "type": 3, + }, + "strokeColor": "#1e1e1e", + "strokeStyle": "solid", + "strokeWidth": 2, + "type": "rectangle", + "width": 20, + "x": 20, + "y": 30, + }, + "inserted": { + "isDeleted": true, + }, + }, }, + "updated": Map {}, }, - { - "PanelComponent": [Function], - "icon": , - "keyTest": [Function], - "label": "labels.duplicateSelection", - "name": "duplicateSelection", - "perform": [Function], - "trackEvent": { - "category": "element", + }, + HistoryEntry { + "appStateChange": AppStateChange { + "delta": Delta { + "deleted": { + "selectedElementIds": { + "id0": true, + }, + }, + "inserted": { + "selectedElementIds": {}, + }, }, }, - { - "icon": [Function], - "keyTest": [Function], - "label": [Function], - "name": "toggleElementLock", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", - }, + "elementsChange": ElementsChange { + "added": Map {}, + "removed": Map {}, + "updated": Map {}, }, - "separator", - { - "PanelComponent": [Function], - "icon": , - "keyTest": [Function], - "label": "labels.delete", - "name": "deleteSelectedElements", - "perform": [Function], - "trackEvent": { - "action": "delete", - "category": "element", + }, + HistoryEntry { + "appStateChange": AppStateChange { + "delta": Delta { + "deleted": { + "selectedGroupIds": { + "id3": true, + }, + }, + "inserted": { + "selectedGroupIds": {}, + }, }, }, - ], - "left": 20, - "top": 30, + "elementsChange": ElementsChange { + "added": Map {}, + "removed": Map {}, + "updated": Map { + "id0" => Delta { + "deleted": { + "groupIds": [ + "id3", + ], + }, + "inserted": { + "groupIds": [], + }, + }, + "id1" => Delta { + "deleted": { + "groupIds": [ + "id3", + ], + }, + "inserted": { + "groupIds": [], + }, + }, + }, + }, + }, + ], +} +`; + +exports[`contextMenu element > selecting 'Group selection' in context menu groups selected elements > [end of test] number of elements 1`] = `2`; + +exports[`contextMenu element > selecting 'Group selection' in context menu groups selected elements > [end of test] number of renders 1`] = `12`; + +exports[`contextMenu element > selecting 'Paste styles' in context menu pastes styles > [end of test] appState 1`] = ` +{ + "activeEmbeddable": null, + "activeTool": { + "customType": null, + "lastActiveTool": null, + "locked": false, + "type": "selection", }, + "collaborators": Map {}, + "contextMenu": null, "currentChartType": "bar", "currentHoveredFontFamily": null, "currentItemArrowType": "round", - "currentItemBackgroundColor": "transparent", + "currentItemBackgroundColor": "#a5d8ff", "currentItemEndArrowhead": "arrow", - "currentItemFillStyle": "solid", + "currentItemFillStyle": "cross-hatch", "currentItemFontFamily": 5, "currentItemFontSize": 20, - "currentItemOpacity": 100, - "currentItemRoughness": 1, + "currentItemOpacity": 60, + "currentItemRoughness": 2, "currentItemRoundness": "round", "currentItemStartArrowhead": null, - "currentItemStrokeColor": "#1e1e1e", - "currentItemStrokeStyle": "solid", + "currentItemStrokeColor": "#e03131", + "currentItemStrokeStyle": "dotted", "currentItemStrokeWidth": 2, "currentItemTextAlign": "left", "cursorButton": "up", @@ -9799,7 +3084,7 @@ exports[`contextMenu element > selecting 'Send to back' in context menu sends el "scrollY": 0, "scrolledOutside": false, "selectedElementIds": { - "id1": true, + "id0": true, }, "selectedElementsAreBeingDragged": false, "selectedGroupIds": {}, @@ -9816,7 +3101,9 @@ exports[`contextMenu element > selecting 'Send to back' in context menu sends el }, "suggestedBindings": [], "theme": "light", - "toast": null, + "toast": { + "message": "Formatierungen kopiert.", + }, "userToFollow": null, "viewBackgroundColor": "#ffffff", "viewModeEnabled": false, @@ -9828,13 +3115,13 @@ exports[`contextMenu element > selecting 'Send to back' in context menu sends el } `; -exports[`contextMenu element > selecting 'Send to back' in context menu sends element to back > [end of test] element 0 1`] = ` +exports[`contextMenu element > selecting 'Paste styles' in context menu pastes styles > [end of test] element 0 1`] = ` { "angle": 0, - "backgroundColor": "transparent", + "backgroundColor": "#a5d8ff", "boundElements": null, "customData": undefined, - "fillStyle": "solid", + "fillStyle": "cross-hatch", "frameId": null, "groupIds": [], "height": 20, @@ -9843,32 +3130,32 @@ exports[`contextMenu element > selecting 'Send to back' in context menu sends el "isDeleted": false, "link": null, "locked": false, - "opacity": 100, - "roughness": 1, + "opacity": 60, + "roughness": 2, "roundness": { "type": 3, }, "seed": 449462985, - "strokeColor": "#1e1e1e", - "strokeStyle": "solid", + "strokeColor": "#e03131", + "strokeStyle": "dotted", "strokeWidth": 2, "type": "rectangle", "updated": 1, - "version": 3, - "versionNonce": 1150084233, + "version": 4, + "versionNonce": 941653321, "width": 20, "x": -10, "y": 0, } `; -exports[`contextMenu element > selecting 'Send to back' in context menu sends element to back > [end of test] element 1 1`] = ` +exports[`contextMenu element > selecting 'Paste styles' in context menu pastes styles > [end of test] element 1 1`] = ` { "angle": 0, - "backgroundColor": "transparent", + "backgroundColor": "#a5d8ff", "boundElements": null, "customData": undefined, - "fillStyle": "solid", + "fillStyle": "cross-hatch", "frameId": null, "groupIds": [], "height": 20, @@ -9877,26 +3164,26 @@ exports[`contextMenu element > selecting 'Send to back' in context menu sends el "isDeleted": false, "link": null, "locked": false, - "opacity": 100, - "roughness": 1, + "opacity": 60, + "roughness": 2, "roundness": { "type": 3, }, - "seed": 1014066025, - "strokeColor": "#1e1e1e", - "strokeStyle": "solid", + "seed": 289600103, + "strokeColor": "#e03131", + "strokeStyle": "dotted", "strokeWidth": 2, "type": "rectangle", "updated": 1, - "version": 3, - "versionNonce": 1604849351, + "version": 9, + "versionNonce": 640725609, "width": 20, "x": 20, "y": 30, } `; -exports[`contextMenu element > selecting 'Send to back' in context menu sends element to back > [end of test] history 1`] = ` +exports[`contextMenu element > selecting 'Paste styles' in context menu pastes styles > [end of test] history 1`] = ` History { "onHistoryChangedEmitter": Emitter { "subscribers": [ @@ -9949,869 +3236,906 @@ History { "x": -10, "y": 0, }, - "inserted": { - "isDeleted": true, - }, - }, - }, - "updated": Map {}, - }, - }, - HistoryEntry { - "appStateChange": AppStateChange { - "delta": Delta { - "deleted": { - "selectedElementIds": { - "id1": true, - }, - }, - "inserted": { - "selectedElementIds": { - "id0": true, - }, - }, - }, - }, - "elementsChange": ElementsChange { - "added": Map {}, - "removed": Map { - "id1" => Delta { - "deleted": { - "angle": 0, - "backgroundColor": "transparent", - "boundElements": null, - "customData": undefined, - "fillStyle": "solid", - "frameId": null, - "groupIds": [], - "height": 20, - "index": "a1", - "isDeleted": false, - "link": null, - "locked": false, - "opacity": 100, - "roughness": 1, - "roundness": { - "type": 3, - }, - "strokeColor": "#1e1e1e", - "strokeStyle": "solid", - "strokeWidth": 2, - "type": "rectangle", - "width": 20, - "x": 20, - "y": 30, - }, - "inserted": { - "isDeleted": true, - }, - }, - }, - "updated": Map {}, - }, - }, - ], -} -`; - -exports[`contextMenu element > selecting 'Send to back' in context menu sends element to back > [end of test] number of elements 1`] = `2`; - -exports[`contextMenu element > selecting 'Send to back' in context menu sends element to back > [end of test] number of renders 1`] = `10`; - -exports[`contextMenu element > selecting 'Ungroup selection' in context menu ungroups selected group > [end of test] appState 1`] = ` -{ - "activeEmbeddable": null, - "activeTool": { - "customType": null, - "lastActiveTool": null, - "locked": false, - "type": "selection", - }, - "collaborators": Map {}, - "contextMenu": { - "items": [ - "separator", - { - "icon": , - "keyTest": [Function], - "label": "labels.cut", - "name": "cut", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "icon": , - "keyTest": undefined, - "label": "labels.copy", - "name": "copy", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "keyTest": undefined, - "label": "labels.paste", - "name": "paste", - "perform": [Function], - "trackEvent": { - "category": "element", + "inserted": { + "isDeleted": true, + }, + }, }, + "updated": Map {}, }, - { - "label": "labels.selectAllElementsInFrame", - "name": "selectAllElementsInFrame", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "canvas", + }, + HistoryEntry { + "appStateChange": AppStateChange { + "delta": Delta { + "deleted": { + "selectedElementIds": { + "id1": true, + }, + }, + "inserted": { + "selectedElementIds": { + "id0": true, + }, + }, }, }, - { - "label": "labels.removeAllElementsFromFrame", - "name": "removeAllElementsFromFrame", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "history", + "elementsChange": ElementsChange { + "added": Map {}, + "removed": Map { + "id1" => Delta { + "deleted": { + "angle": 0, + "backgroundColor": "transparent", + "boundElements": null, + "customData": undefined, + "fillStyle": "solid", + "frameId": null, + "groupIds": [], + "height": 20, + "index": "a1", + "isDeleted": false, + "link": null, + "locked": false, + "opacity": 100, + "roughness": 1, + "roundness": { + "type": 3, + }, + "strokeColor": "#1e1e1e", + "strokeStyle": "solid", + "strokeWidth": 2, + "type": "rectangle", + "width": 20, + "x": 20, + "y": 30, + }, + "inserted": { + "isDeleted": true, + }, + }, }, + "updated": Map {}, }, - "separator", - { - "icon": , - "keyTest": [Function], - "keywords": [ - "png", - "clipboard", - "copy", - ], - "label": "labels.copyAsPng", - "name": "copyAsPng", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", + }, + HistoryEntry { + "appStateChange": AppStateChange { + "delta": Delta { + "deleted": {}, + "inserted": {}, }, }, - { - "icon": , - "keywords": [ - "svg", - "clipboard", - "copy", - ], - "label": "labels.copyAsSvg", - "name": "copyAsSvg", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", + "elementsChange": ElementsChange { + "added": Map {}, + "removed": Map {}, + "updated": Map { + "id1" => Delta { + "deleted": { + "strokeColor": "#e03131", + }, + "inserted": { + "strokeColor": "#1e1e1e", + }, + }, }, }, - { - "keywords": [ - "text", - "clipboard", - "copy", - ], - "label": "labels.copyText", - "name": "copyText", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", + }, + HistoryEntry { + "appStateChange": AppStateChange { + "delta": Delta { + "deleted": {}, + "inserted": {}, }, }, - "separator", - { - "icon": , - "keyTest": [Function], - "label": "labels.copyStyles", - "name": "copyStyles", - "perform": [Function], - "trackEvent": { - "category": "element", + "elementsChange": ElementsChange { + "added": Map {}, + "removed": Map {}, + "updated": Map { + "id1" => Delta { + "deleted": { + "backgroundColor": "#a5d8ff", + }, + "inserted": { + "backgroundColor": "transparent", + }, + }, + }, + }, + }, + HistoryEntry { + "appStateChange": AppStateChange { + "delta": Delta { + "deleted": {}, + "inserted": {}, }, }, - { - "icon": , - "keyTest": [Function], - "label": "labels.pasteStyles", - "name": "pasteStyles", - "perform": [Function], - "trackEvent": { - "category": "element", + "elementsChange": ElementsChange { + "added": Map {}, + "removed": Map {}, + "updated": Map { + "id1" => Delta { + "deleted": { + "fillStyle": "cross-hatch", + }, + "inserted": { + "fillStyle": "solid", + }, + }, }, }, - "separator", - { - "PanelComponent": [Function], - "icon": [Function], - "keyTest": [Function], - "label": "labels.group", - "name": "group", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", + }, + HistoryEntry { + "appStateChange": AppStateChange { + "delta": Delta { + "deleted": {}, + "inserted": {}, }, }, - { - "icon": null, - "label": "labels.autoResize", - "name": "autoResize", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", + "elementsChange": ElementsChange { + "added": Map {}, + "removed": Map {}, + "updated": Map { + "id1" => Delta { + "deleted": { + "strokeStyle": "dotted", + }, + "inserted": { + "strokeStyle": "solid", + }, + }, }, }, - { - "label": "labels.unbindText", - "name": "unbindText", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", + }, + HistoryEntry { + "appStateChange": AppStateChange { + "delta": Delta { + "deleted": {}, + "inserted": {}, }, }, - { - "label": "labels.bindText", - "name": "bindText", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", + "elementsChange": ElementsChange { + "added": Map {}, + "removed": Map {}, + "updated": Map { + "id1" => Delta { + "deleted": { + "roughness": 2, + }, + "inserted": { + "roughness": 1, + }, + }, }, }, - { - "label": "labels.createContainerFromText", - "name": "wrapTextInContainer", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", + }, + HistoryEntry { + "appStateChange": AppStateChange { + "delta": Delta { + "deleted": {}, + "inserted": {}, }, }, - { - "PanelComponent": [Function], - "icon": [Function], - "keyTest": [Function], - "label": "labels.ungroup", - "name": "ungroup", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", + "elementsChange": ElementsChange { + "added": Map {}, + "removed": Map {}, + "updated": Map { + "id1" => Delta { + "deleted": { + "opacity": 60, + }, + "inserted": { + "opacity": 100, + }, + }, }, }, - "separator", - { - "label": "labels.addToLibrary", - "name": "addToLibrary", - "perform": [Function], - "trackEvent": { - "category": "element", + }, + HistoryEntry { + "appStateChange": AppStateChange { + "delta": Delta { + "deleted": { + "selectedElementIds": { + "id0": true, + }, + }, + "inserted": { + "selectedElementIds": { + "id1": true, + }, + }, }, }, - "separator", - { - "PanelComponent": [Function], - "icon": , - "keyPriority": 40, - "keyTest": [Function], - "keywords": [ - "move down", - "zindex", - "layer", - ], - "label": "labels.sendBackward", - "name": "sendBackward", - "perform": [Function], - "trackEvent": { - "category": "element", + "elementsChange": ElementsChange { + "added": Map {}, + "removed": Map {}, + "updated": Map { + "id0" => Delta { + "deleted": { + "backgroundColor": "#a5d8ff", + "fillStyle": "cross-hatch", + "opacity": 60, + "roughness": 2, + "strokeColor": "#e03131", + "strokeStyle": "dotted", + }, + "inserted": { + "backgroundColor": "transparent", + "fillStyle": "solid", + "opacity": 100, + "roughness": 1, + "strokeColor": "#1e1e1e", + "strokeStyle": "solid", + }, + }, + }, + }, + }, + ], +} +`; + +exports[`contextMenu element > selecting 'Paste styles' in context menu pastes styles > [end of test] number of elements 1`] = `2`; + +exports[`contextMenu element > selecting 'Paste styles' in context menu pastes styles > [end of test] number of renders 1`] = `18`; + +exports[`contextMenu element > selecting 'Send backward' in context menu sends element backward > [end of test] appState 1`] = ` +{ + "activeEmbeddable": null, + "activeTool": { + "customType": null, + "lastActiveTool": null, + "locked": false, + "type": "selection", + }, + "collaborators": Map {}, + "contextMenu": null, + "currentChartType": "bar", + "currentHoveredFontFamily": null, + "currentItemArrowType": "round", + "currentItemBackgroundColor": "transparent", + "currentItemEndArrowhead": "arrow", + "currentItemFillStyle": "solid", + "currentItemFontFamily": 5, + "currentItemFontSize": 20, + "currentItemOpacity": 100, + "currentItemRoughness": 1, + "currentItemRoundness": "round", + "currentItemStartArrowhead": null, + "currentItemStrokeColor": "#1e1e1e", + "currentItemStrokeStyle": "solid", + "currentItemStrokeWidth": 2, + "currentItemTextAlign": "left", + "cursorButton": "up", + "defaultSidebarDockedPreference": false, + "editingElement": null, + "editingFrame": null, + "editingGroupId": null, + "editingLinearElement": null, + "elementsToHighlight": null, + "errorMessage": null, + "exportBackground": true, + "exportEmbedScene": false, + "exportScale": 1, + "exportWithDarkMode": false, + "featureFlagLibraryButton": false, + "featureFlagWelcomeScreen": false, + "fileHandle": null, + "followedBy": Set {}, + "frameRendering": { + "clip": true, + "enabled": true, + "name": true, + "outline": true, + }, + "frameToHighlight": null, + "gridModeEnabled": false, + "gridSize": 20, + "gridStep": 5, + "height": 100, + "isBindingEnabled": true, + "isLoading": false, + "isResizing": false, + "isRotating": false, + "lastPointerDownWith": "mouse", + "multiElement": null, + "name": "Unbenannt-201933152653", + "newElement": null, + "objectsSnapModeEnabled": false, + "offsetLeft": 20, + "offsetTop": 10, + "openDialog": null, + "openMenu": null, + "openPopup": null, + "openSidebar": null, + "originSnapOffset": null, + "pasteDialog": { + "data": null, + "shown": false, + }, + "penDetected": false, + "penMode": false, + "pendingImageElementId": null, + "previousSelectedElementIds": {}, + "resizingElement": null, + "scrollX": 0, + "scrollY": 0, + "scrolledOutside": false, + "selectedElementIds": { + "id1": true, + }, + "selectedElementsAreBeingDragged": false, + "selectedGroupIds": {}, + "selectedLinearElement": null, + "selectionElement": null, + "shouldCacheIgnoreZoom": false, + "showHyperlinkPopup": false, + "showWelcomeScreen": true, + "snapLines": [], + "startBoundElement": null, + "stats": { + "open": false, + "panels": 3, + }, + "suggestedBindings": [], + "theme": "light", + "toast": null, + "userToFollow": null, + "viewBackgroundColor": "#ffffff", + "viewModeEnabled": false, + "width": 200, + "zenModeEnabled": false, + "zoom": { + "value": 1, + }, +} +`; + +exports[`contextMenu element > selecting 'Send backward' in context menu sends element backward > [end of test] element 0 1`] = ` +{ + "angle": 0, + "backgroundColor": "transparent", + "boundElements": null, + "customData": undefined, + "fillStyle": "solid", + "frameId": null, + "groupIds": [], + "height": 20, + "id": "id1", + "index": "Zz", + "isDeleted": false, + "link": null, + "locked": false, + "opacity": 100, + "roughness": 1, + "roundness": { + "type": 3, + }, + "seed": 1014066025, + "strokeColor": "#1e1e1e", + "strokeStyle": "solid", + "strokeWidth": 2, + "type": "rectangle", + "updated": 1, + "version": 4, + "versionNonce": 23633383, + "width": 20, + "x": 20, + "y": 30, +} +`; + +exports[`contextMenu element > selecting 'Send backward' in context menu sends element backward > [end of test] element 1 1`] = ` +{ + "angle": 0, + "backgroundColor": "transparent", + "boundElements": null, + "customData": undefined, + "fillStyle": "solid", + "frameId": null, + "groupIds": [], + "height": 20, + "id": "id0", + "index": "a0", + "isDeleted": false, + "link": null, + "locked": false, + "opacity": 100, + "roughness": 1, + "roundness": { + "type": 3, + }, + "seed": 449462985, + "strokeColor": "#1e1e1e", + "strokeStyle": "solid", + "strokeWidth": 2, + "type": "rectangle", + "updated": 1, + "version": 3, + "versionNonce": 1150084233, + "width": 20, + "x": -10, + "y": 0, +} +`; + +exports[`contextMenu element > selecting 'Send backward' in context menu sends element backward > [end of test] history 1`] = ` +History { + "onHistoryChangedEmitter": Emitter { + "subscribers": [ + [Function], + [Function], + ], + }, + "redoStack": [], + "undoStack": [ + HistoryEntry { + "appStateChange": AppStateChange { + "delta": Delta { + "deleted": { + "selectedElementIds": { + "id0": true, + }, + }, + "inserted": { + "selectedElementIds": {}, + }, }, }, - { - "PanelComponent": [Function], - "icon": , - "keyPriority": 40, - "keyTest": [Function], - "keywords": [ - "move up", - "zindex", - "layer", - ], - "label": "labels.bringForward", - "name": "bringForward", - "perform": [Function], - "trackEvent": { - "category": "element", + "elementsChange": ElementsChange { + "added": Map {}, + "removed": Map { + "id0" => Delta { + "deleted": { + "angle": 0, + "backgroundColor": "transparent", + "boundElements": null, + "customData": undefined, + "fillStyle": "solid", + "frameId": null, + "groupIds": [], + "height": 20, + "index": "a0", + "isDeleted": false, + "link": null, + "locked": false, + "opacity": 100, + "roughness": 1, + "roundness": { + "type": 3, + }, + "strokeColor": "#1e1e1e", + "strokeStyle": "solid", + "strokeWidth": 2, + "type": "rectangle", + "width": 20, + "x": -10, + "y": 0, + }, + "inserted": { + "isDeleted": true, + }, + }, }, + "updated": Map {}, }, - { - "PanelComponent": [Function], - "icon": , - "keyTest": [Function], - "keywords": [ - "move down", - "zindex", - "layer", - ], - "label": "labels.sendToBack", - "name": "sendToBack", - "perform": [Function], - "trackEvent": { - "category": "element", + }, + HistoryEntry { + "appStateChange": AppStateChange { + "delta": Delta { + "deleted": { + "selectedElementIds": { + "id1": true, + }, + }, + "inserted": { + "selectedElementIds": { + "id0": true, + }, + }, }, }, - { - "PanelComponent": [Function], - "icon": , - "keyTest": [Function], - "keywords": [ - "move up", - "zindex", - "layer", - ], - "label": "labels.bringToFront", - "name": "bringToFront", - "perform": [Function], - "trackEvent": { - "category": "element", + "elementsChange": ElementsChange { + "added": Map {}, + "removed": Map { + "id1" => Delta { + "deleted": { + "angle": 0, + "backgroundColor": "transparent", + "boundElements": null, + "customData": undefined, + "fillStyle": "solid", + "frameId": null, + "groupIds": [], + "height": 20, + "index": "a1", + "isDeleted": false, + "link": null, + "locked": false, + "opacity": 100, + "roughness": 1, + "roundness": { + "type": 3, + }, + "strokeColor": "#1e1e1e", + "strokeStyle": "solid", + "strokeWidth": 2, + "type": "rectangle", + "width": 20, + "x": 20, + "y": 30, + }, + "inserted": { + "isDeleted": true, + }, + }, }, + "updated": Map {}, }, - "separator", - { - "icon": , - "keyTest": [Function], - "label": "labels.flipHorizontal", - "name": "flipHorizontal", - "perform": [Function], - "trackEvent": { - "category": "element", + }, + HistoryEntry { + "appStateChange": AppStateChange { + "delta": Delta { + "deleted": {}, + "inserted": {}, }, }, - { - "icon": , - "keyTest": [Function], - "label": "labels.flipVertical", - "name": "flipVertical", - "perform": [Function], - "trackEvent": { - "category": "element", + "elementsChange": ElementsChange { + "added": Map {}, + "removed": Map {}, + "updated": Map { + "id1" => Delta { + "deleted": { + "index": "Zz", + }, + "inserted": { + "index": "a1", + }, + }, }, }, - "separator", - { - "PanelComponent": [Function], - "category": "Elements", - "keywords": [ - "line", - ], - "label": [Function], - "name": "toggleLinearEditor", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", + }, + ], +} +`; + +exports[`contextMenu element > selecting 'Send backward' in context menu sends element backward > [end of test] number of elements 1`] = `2`; + +exports[`contextMenu element > selecting 'Send backward' in context menu sends element backward > [end of test] number of renders 1`] = `11`; + +exports[`contextMenu element > selecting 'Send to back' in context menu sends element to back > [end of test] appState 1`] = ` +{ + "activeEmbeddable": null, + "activeTool": { + "customType": null, + "lastActiveTool": null, + "locked": false, + "type": "selection", + }, + "collaborators": Map {}, + "contextMenu": null, + "currentChartType": "bar", + "currentHoveredFontFamily": null, + "currentItemArrowType": "round", + "currentItemBackgroundColor": "transparent", + "currentItemEndArrowhead": "arrow", + "currentItemFillStyle": "solid", + "currentItemFontFamily": 5, + "currentItemFontSize": 20, + "currentItemOpacity": 100, + "currentItemRoughness": 1, + "currentItemRoundness": "round", + "currentItemStartArrowhead": null, + "currentItemStrokeColor": "#1e1e1e", + "currentItemStrokeStyle": "solid", + "currentItemStrokeWidth": 2, + "currentItemTextAlign": "left", + "cursorButton": "up", + "defaultSidebarDockedPreference": false, + "editingElement": null, + "editingFrame": null, + "editingGroupId": null, + "editingLinearElement": null, + "elementsToHighlight": null, + "errorMessage": null, + "exportBackground": true, + "exportEmbedScene": false, + "exportScale": 1, + "exportWithDarkMode": false, + "featureFlagLibraryButton": false, + "featureFlagWelcomeScreen": false, + "fileHandle": null, + "followedBy": Set {}, + "frameRendering": { + "clip": true, + "enabled": true, + "name": true, + "outline": true, + }, + "frameToHighlight": null, + "gridModeEnabled": false, + "gridSize": 20, + "gridStep": 5, + "height": 100, + "isBindingEnabled": true, + "isLoading": false, + "isResizing": false, + "isRotating": false, + "lastPointerDownWith": "mouse", + "multiElement": null, + "name": "Unbenannt-201933152653", + "newElement": null, + "objectsSnapModeEnabled": false, + "offsetLeft": 20, + "offsetTop": 10, + "openDialog": null, + "openMenu": null, + "openPopup": null, + "openSidebar": null, + "originSnapOffset": null, + "pasteDialog": { + "data": null, + "shown": false, + }, + "penDetected": false, + "penMode": false, + "pendingImageElementId": null, + "previousSelectedElementIds": {}, + "resizingElement": null, + "scrollX": 0, + "scrollY": 0, + "scrolledOutside": false, + "selectedElementIds": { + "id1": true, + }, + "selectedElementsAreBeingDragged": false, + "selectedGroupIds": {}, + "selectedLinearElement": null, + "selectionElement": null, + "shouldCacheIgnoreZoom": false, + "showHyperlinkPopup": false, + "showWelcomeScreen": true, + "snapLines": [], + "startBoundElement": null, + "stats": { + "open": false, + "panels": 3, + }, + "suggestedBindings": [], + "theme": "light", + "toast": null, + "userToFollow": null, + "viewBackgroundColor": "#ffffff", + "viewModeEnabled": false, + "width": 200, + "zenModeEnabled": false, + "zoom": { + "value": 1, + }, +} +`; + +exports[`contextMenu element > selecting 'Send to back' in context menu sends element to back > [end of test] element 0 1`] = ` +{ + "angle": 0, + "backgroundColor": "transparent", + "boundElements": null, + "customData": undefined, + "fillStyle": "solid", + "frameId": null, + "groupIds": [], + "height": 20, + "id": "id1", + "index": "Zz", + "isDeleted": false, + "link": null, + "locked": false, + "opacity": 100, + "roughness": 1, + "roundness": { + "type": 3, + }, + "seed": 1014066025, + "strokeColor": "#1e1e1e", + "strokeStyle": "solid", + "strokeWidth": 2, + "type": "rectangle", + "updated": 1, + "version": 4, + "versionNonce": 23633383, + "width": 20, + "x": 20, + "y": 30, +} +`; + +exports[`contextMenu element > selecting 'Send to back' in context menu sends element to back > [end of test] element 1 1`] = ` +{ + "angle": 0, + "backgroundColor": "transparent", + "boundElements": null, + "customData": undefined, + "fillStyle": "solid", + "frameId": null, + "groupIds": [], + "height": 20, + "id": "id0", + "index": "a0", + "isDeleted": false, + "link": null, + "locked": false, + "opacity": 100, + "roughness": 1, + "roundness": { + "type": 3, + }, + "seed": 449462985, + "strokeColor": "#1e1e1e", + "strokeStyle": "solid", + "strokeWidth": 2, + "type": "rectangle", + "updated": 1, + "version": 3, + "versionNonce": 1150084233, + "width": 20, + "x": -10, + "y": 0, +} +`; + +exports[`contextMenu element > selecting 'Send to back' in context menu sends element to back > [end of test] history 1`] = ` +History { + "onHistoryChangedEmitter": Emitter { + "subscribers": [ + [Function], + [Function], + ], + }, + "redoStack": [], + "undoStack": [ + HistoryEntry { + "appStateChange": AppStateChange { + "delta": Delta { + "deleted": { + "selectedElementIds": { + "id0": true, + }, + }, + "inserted": { + "selectedElementIds": {}, + }, + }, + }, + "elementsChange": ElementsChange { + "added": Map {}, + "removed": Map { + "id0" => Delta { + "deleted": { + "angle": 0, + "backgroundColor": "transparent", + "boundElements": null, + "customData": undefined, + "fillStyle": "solid", + "frameId": null, + "groupIds": [], + "height": 20, + "index": "a0", + "isDeleted": false, + "link": null, + "locked": false, + "opacity": 100, + "roughness": 1, + "roundness": { + "type": 3, + }, + "strokeColor": "#1e1e1e", + "strokeStyle": "solid", + "strokeWidth": 2, + "type": "rectangle", + "width": 20, + "x": -10, + "y": 0, + }, + "inserted": { + "isDeleted": true, + }, + }, }, + "updated": Map {}, }, - { - "PanelComponent": [Function], - "icon": , - "keyTest": [Function], - "label": [Function], - "name": "hyperlink", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "action": "click", - "category": "hyperlink", + }, + HistoryEntry { + "appStateChange": AppStateChange { + "delta": Delta { + "deleted": { + "selectedElementIds": { + "id1": true, + }, + }, + "inserted": { + "selectedElementIds": { + "id0": true, + }, + }, }, }, - { - "PanelComponent": [Function], - "icon": , - "keyTest": [Function], - "label": "labels.duplicateSelection", - "name": "duplicateSelection", - "perform": [Function], - "trackEvent": { - "category": "element", + "elementsChange": ElementsChange { + "added": Map {}, + "removed": Map { + "id1" => Delta { + "deleted": { + "angle": 0, + "backgroundColor": "transparent", + "boundElements": null, + "customData": undefined, + "fillStyle": "solid", + "frameId": null, + "groupIds": [], + "height": 20, + "index": "a1", + "isDeleted": false, + "link": null, + "locked": false, + "opacity": 100, + "roughness": 1, + "roundness": { + "type": 3, + }, + "strokeColor": "#1e1e1e", + "strokeStyle": "solid", + "strokeWidth": 2, + "type": "rectangle", + "width": 20, + "x": 20, + "y": 30, + }, + "inserted": { + "isDeleted": true, + }, + }, }, + "updated": Map {}, }, - { - "icon": [Function], - "keyTest": [Function], - "label": [Function], - "name": "toggleElementLock", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", + }, + HistoryEntry { + "appStateChange": AppStateChange { + "delta": Delta { + "deleted": {}, + "inserted": {}, }, }, - "separator", - { - "PanelComponent": [Function], - "icon": , - "keyTest": [Function], - "label": "labels.delete", - "name": "deleteSelectedElements", - "perform": [Function], - "trackEvent": { - "action": "delete", - "category": "element", + "elementsChange": ElementsChange { + "added": Map {}, + "removed": Map {}, + "updated": Map { + "id1" => Delta { + "deleted": { + "index": "Zz", + }, + "inserted": { + "index": "a1", + }, + }, }, }, - ], - "left": -17, - "top": -7, + }, + ], +} +`; + +exports[`contextMenu element > selecting 'Send to back' in context menu sends element to back > [end of test] number of elements 1`] = `2`; + +exports[`contextMenu element > selecting 'Send to back' in context menu sends element to back > [end of test] number of renders 1`] = `11`; + +exports[`contextMenu element > selecting 'Ungroup selection' in context menu ungroups selected group > [end of test] appState 1`] = ` +{ + "activeEmbeddable": null, + "activeTool": { + "customType": null, + "lastActiveTool": null, + "locked": false, + "type": "selection", }, + "collaborators": Map {}, + "contextMenu": null, "currentChartType": "bar", "currentHoveredFontFamily": null, "currentItemArrowType": "round", @@ -10890,9 +4214,7 @@ exports[`contextMenu element > selecting 'Ungroup selection' in context menu ung "id1": true, }, "selectedElementsAreBeingDragged": false, - "selectedGroupIds": { - "id3": true, - }, + "selectedGroupIds": {}, "selectedLinearElement": null, "selectionElement": null, "shouldCacheIgnoreZoom": false, @@ -10926,9 +4248,7 @@ exports[`contextMenu element > selecting 'Ungroup selection' in context menu ung "customData": undefined, "fillStyle": "solid", "frameId": null, - "groupIds": [ - "id3", - ], + "groupIds": [], "height": 20, "id": "id0", "index": "a0", @@ -10946,8 +4266,8 @@ exports[`contextMenu element > selecting 'Ungroup selection' in context menu ung "strokeWidth": 2, "type": "rectangle", "updated": 1, - "version": 4, - "versionNonce": 915032327, + "version": 5, + "versionNonce": 1723083209, "width": 20, "x": -10, "y": 0, @@ -10962,9 +4282,7 @@ exports[`contextMenu element > selecting 'Ungroup selection' in context menu ung "customData": undefined, "fillStyle": "solid", "frameId": null, - "groupIds": [ - "id3", - ], + "groupIds": [], "height": 20, "id": "id1", "index": "a1", @@ -10982,8 +4300,8 @@ exports[`contextMenu element > selecting 'Ungroup selection' in context menu ung "strokeWidth": 2, "type": "rectangle", "updated": 1, - "version": 4, - "versionNonce": 81784553, + "version": 5, + "versionNonce": 760410951, "width": 20, "x": 20, "y": 30, @@ -11163,13 +4481,53 @@ History { }, }, }, + HistoryEntry { + "appStateChange": AppStateChange { + "delta": Delta { + "deleted": { + "selectedGroupIds": {}, + }, + "inserted": { + "selectedGroupIds": { + "id3": true, + }, + }, + }, + }, + "elementsChange": ElementsChange { + "added": Map {}, + "removed": Map {}, + "updated": Map { + "id0" => Delta { + "deleted": { + "groupIds": [], + }, + "inserted": { + "groupIds": [ + "id3", + ], + }, + }, + "id1" => Delta { + "deleted": { + "groupIds": [], + }, + "inserted": { + "groupIds": [ + "id3", + ], + }, + }, + }, + }, + }, ], } `; exports[`contextMenu element > selecting 'Ungroup selection' in context menu ungroups selected group > [end of test] number of elements 1`] = `2`; -exports[`contextMenu element > selecting 'Ungroup selection' in context menu ungroups selected group > [end of test] number of renders 1`] = `12`; +exports[`contextMenu element > selecting 'Ungroup selection' in context menu ungroups selected group > [end of test] number of renders 1`] = `13`; exports[`contextMenu element > shows 'Group selection' in context menu for multiple selected elements > [end of test] appState 1`] = ` { diff --git a/packages/excalidraw/tests/__snapshots__/history.test.tsx.snap b/packages/excalidraw/tests/__snapshots__/history.test.tsx.snap index 59b82f46bc65..ab7c1bfcb325 100644 --- a/packages/excalidraw/tests/__snapshots__/history.test.tsx.snap +++ b/packages/excalidraw/tests/__snapshots__/history.test.tsx.snap @@ -77,13 +77,13 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl "penMode": false, "pendingImageElementId": null, "previousSelectedElementIds": { - "id158": true, + "id166": true, }, "resizingElement": null, "scrollX": 0, "scrollY": 0, "selectedElementIds": { - "id158": true, + "id166": true, }, "selectedElementsAreBeingDragged": false, "selectedGroupIds": {}, @@ -121,7 +121,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl "frameId": null, "groupIds": [], "height": 100, - "id": "id156", + "id": "id164", "index": "a0", "isDeleted": false, "link": null, @@ -153,7 +153,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl "frameId": null, "groupIds": [], "height": 100, - "id": "id157", + "id": "id165", "index": "a1", "isDeleted": false, "link": null, @@ -184,7 +184,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl "elbowed": false, "endArrowhead": "arrow", "endBinding": { - "elementId": "id161", + "elementId": "id169", "fixedPoint": [ "0.50000", 1, @@ -196,7 +196,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl "frameId": null, "groupIds": [], "height": 99, - "id": "id158", + "id": "id166", "index": "a2", "isDeleted": false, "lastCommittedPoint": null, @@ -237,7 +237,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl "backgroundColor": "transparent", "boundElements": [ { - "id": "id158", + "id": "id166", "type": "arrow", }, ], @@ -246,7 +246,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl "frameId": null, "groupIds": [], "height": 50, - "id": "id161", + "id": "id169", "index": "a3", "isDeleted": false, "link": null, @@ -288,10 +288,10 @@ History { "added": Map {}, "removed": Map {}, "updated": Map { - "id158" => Delta { + "id166" => Delta { "deleted": { "endBinding": { - "elementId": "id157", + "elementId": "id165", "fixedPoint": null, "focus": "0.00990", "gap": 1, @@ -308,7 +308,7 @@ History { ], ], "startBinding": { - "elementId": "id156", + "elementId": "id164", "fixedPoint": null, "focus": "0.02970", "gap": 1, @@ -316,7 +316,7 @@ History { }, "inserted": { "endBinding": { - "elementId": "id157", + "elementId": "id165", "fixedPoint": null, "focus": "-0.02000", "gap": 1, @@ -333,7 +333,7 @@ History { ], ], "startBinding": { - "elementId": "id156", + "elementId": "id164", "fixedPoint": null, "focus": "0.02000", "gap": 1, @@ -354,36 +354,36 @@ History { "added": Map {}, "removed": Map {}, "updated": Map { - "id156" => Delta { + "id164" => Delta { "deleted": { "boundElements": [], }, "inserted": { "boundElements": [ { - "id": "id158", + "id": "id166", "type": "arrow", }, ], }, }, - "id157" => Delta { + "id165" => Delta { "deleted": { "boundElements": [], }, "inserted": { "boundElements": [ { - "id": "id158", + "id": "id166", "type": "arrow", }, ], }, }, - "id158" => Delta { + "id166" => Delta { "deleted": { "endBinding": { - "elementId": "id161", + "elementId": "id169", "fixedPoint": [ "0.50000", 1, @@ -407,7 +407,7 @@ History { }, "inserted": { "endBinding": { - "elementId": "id157", + "elementId": "id165", "fixedPoint": null, "focus": "0.00990", "gap": 1, @@ -424,7 +424,7 @@ History { ], ], "startBinding": { - "elementId": "id156", + "elementId": "id164", "fixedPoint": null, "focus": "0.02970", "gap": 1, @@ -432,11 +432,11 @@ History { "y": "0.99245", }, }, - "id161" => Delta { + "id169" => Delta { "deleted": { "boundElements": [ { - "id": "id158", + "id": "id166", "type": "arrow", }, ], @@ -460,7 +460,7 @@ History { "elementsChange": ElementsChange { "added": Map {}, "removed": Map { - "id156" => Delta { + "id164" => Delta { "deleted": { "angle": 0, "backgroundColor": "transparent", @@ -491,7 +491,7 @@ History { "isDeleted": true, }, }, - "id157" => Delta { + "id165" => Delta { "deleted": { "angle": 0, "backgroundColor": "transparent", @@ -531,9 +531,9 @@ History { "delta": Delta { "deleted": { "selectedElementIds": { - "id158": true, + "id166": true, }, - "selectedLinearElementId": "id158", + "selectedLinearElementId": "id166", }, "inserted": { "selectedElementIds": {}, @@ -544,7 +544,7 @@ History { "elementsChange": ElementsChange { "added": Map {}, "removed": Map { - "id158" => Delta { + "id166" => Delta { "deleted": { "angle": 0, "backgroundColor": "transparent", @@ -680,13 +680,13 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl "penMode": false, "pendingImageElementId": null, "previousSelectedElementIds": { - "id153": true, + "id161": true, }, "resizingElement": null, "scrollX": 0, "scrollY": 0, "selectedElementIds": { - "id153": true, + "id161": true, }, "selectedElementsAreBeingDragged": false, "selectedGroupIds": {}, @@ -724,7 +724,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl "frameId": null, "groupIds": [], "height": 100, - "id": "id151", + "id": "id159", "index": "a0", "isDeleted": false, "link": null, @@ -756,7 +756,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl "frameId": null, "groupIds": [], "height": 100, - "id": "id152", + "id": "id160", "index": "a1", "isDeleted": false, "link": null, @@ -791,7 +791,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl "frameId": null, "groupIds": [], "height": 0, - "id": "id153", + "id": "id161", "index": "a2", "isDeleted": false, "lastCommittedPoint": null, @@ -846,7 +846,7 @@ History { "added": Map {}, "removed": Map {}, "updated": Map { - "id153" => Delta { + "id161" => Delta { "deleted": { "points": [ [ @@ -886,33 +886,33 @@ History { "added": Map {}, "removed": Map {}, "updated": Map { - "id151" => Delta { + "id159" => Delta { "deleted": { "boundElements": [], }, "inserted": { "boundElements": [ { - "id": "id153", + "id": "id161", "type": "arrow", }, ], }, }, - "id152" => Delta { + "id160" => Delta { "deleted": { "boundElements": [], }, "inserted": { "boundElements": [ { - "id": "id153", + "id": "id161", "type": "arrow", }, ], }, }, - "id153" => Delta { + "id161" => Delta { "deleted": { "endBinding": null, "points": [ @@ -929,7 +929,7 @@ History { }, "inserted": { "endBinding": { - "elementId": "id152", + "elementId": "id160", "fixedPoint": null, "focus": 0, "gap": 1, @@ -945,7 +945,7 @@ History { ], ], "startBinding": { - "elementId": "id151", + "elementId": "id159", "fixedPoint": null, "focus": 0, "gap": 1, @@ -967,7 +967,7 @@ History { "elementsChange": ElementsChange { "added": Map {}, "removed": Map { - "id151" => Delta { + "id159" => Delta { "deleted": { "angle": 0, "backgroundColor": "transparent", @@ -998,7 +998,7 @@ History { "isDeleted": true, }, }, - "id152" => Delta { + "id160" => Delta { "deleted": { "angle": 0, "backgroundColor": "transparent", @@ -1038,9 +1038,9 @@ History { "delta": Delta { "deleted": { "selectedElementIds": { - "id153": true, + "id161": true, }, - "selectedLinearElementId": "id153", + "selectedLinearElementId": "id161", }, "inserted": { "selectedElementIds": {}, @@ -1051,7 +1051,7 @@ History { "elementsChange": ElementsChange { "added": Map {}, "removed": Map { - "id153" => Delta { + "id161" => Delta { "deleted": { "angle": 0, "backgroundColor": "transparent", @@ -1229,7 +1229,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl "elbowed": false, "endArrowhead": null, "endBinding": { - "elementId": "id163", + "elementId": "id171", "fixedPoint": [ "0.50000", 1, @@ -1241,7 +1241,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl "frameId": null, "groupIds": [], "height": "2.61991", - "id": "id164", + "id": "id172", "index": "Zz", "isDeleted": false, "lastCommittedPoint": null, @@ -1264,7 +1264,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl }, "startArrowhead": null, "startBinding": { - "elementId": "id162", + "elementId": "id170", "fixedPoint": [ 1, "0.50000", @@ -1290,7 +1290,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl "backgroundColor": "transparent", "boundElements": [ { - "id": "id164", + "id": "id172", "type": "arrow", }, ], @@ -1299,7 +1299,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl "frameId": null, "groupIds": [], "height": 100, - "id": "id162", + "id": "id170", "index": "a0", "isDeleted": false, "link": null, @@ -1327,7 +1327,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl "backgroundColor": "transparent", "boundElements": [ { - "id": "id164", + "id": "id172", "type": "arrow", }, ], @@ -1336,7 +1336,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl "frameId": null, "groupIds": [], "height": 100, - "id": "id163", + "id": "id171", "index": "a1", "isDeleted": false, "link": null, @@ -1378,7 +1378,7 @@ History { "elementsChange": ElementsChange { "added": Map {}, "removed": Map { - "id162" => Delta { + "id170" => Delta { "deleted": { "angle": 0, "backgroundColor": "transparent", @@ -1409,7 +1409,7 @@ History { "isDeleted": true, }, }, - "id163" => Delta { + "id171" => Delta { "deleted": { "angle": 0, "backgroundColor": "transparent", @@ -1442,10 +1442,10 @@ History { }, }, "updated": Map { - "id164" => Delta { + "id172" => Delta { "deleted": { "endBinding": { - "elementId": "id163", + "elementId": "id171", "fixedPoint": [ "0.50000", 1, @@ -1454,7 +1454,7 @@ History { "gap": 1, }, "startBinding": { - "elementId": "id162", + "elementId": "id170", "fixedPoint": [ 1, "0.50000", @@ -1598,7 +1598,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl "elbowed": false, "endArrowhead": null, "endBinding": { - "elementId": "id166", + "elementId": "id174", "fixedPoint": [ 1, "0.50000", @@ -1610,7 +1610,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl "frameId": null, "groupIds": [], "height": "2.61991", - "id": "id167", + "id": "id175", "index": "a0", "isDeleted": false, "lastCommittedPoint": null, @@ -1633,7 +1633,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl }, "startArrowhead": null, "startBinding": { - "elementId": "id165", + "elementId": "id173", "fixedPoint": [ "0.50000", 1, @@ -1659,7 +1659,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl "backgroundColor": "transparent", "boundElements": [ { - "id": "id167", + "id": "id175", "type": "arrow", }, ], @@ -1668,7 +1668,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl "frameId": null, "groupIds": [], "height": 100, - "id": "id165", + "id": "id173", "index": "a0V", "isDeleted": false, "link": null, @@ -1696,7 +1696,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl "backgroundColor": "transparent", "boundElements": [ { - "id": "id167", + "id": "id175", "type": "arrow", }, ], @@ -1705,7 +1705,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl "frameId": null, "groupIds": [], "height": 100, - "id": "id166", + "id": "id174", "index": "a1", "isDeleted": false, "link": null, @@ -1747,7 +1747,7 @@ History { "elementsChange": ElementsChange { "added": Map {}, "removed": Map { - "id167" => Delta { + "id175" => Delta { "deleted": { "angle": 0, "backgroundColor": "transparent", @@ -1756,7 +1756,7 @@ History { "elbowed": false, "endArrowhead": null, "endBinding": { - "elementId": "id166", + "elementId": "id174", "fixedPoint": [ 1, "0.50000", @@ -1790,7 +1790,7 @@ History { }, "startArrowhead": null, "startBinding": { - "elementId": "id165", + "elementId": "id173", "fixedPoint": [ "0.50000", 1, @@ -1812,11 +1812,11 @@ History { }, }, "updated": Map { - "id165" => Delta { + "id173" => Delta { "deleted": { "boundElements": [ { - "id": "id167", + "id": "id175", "type": "arrow", }, ], @@ -1825,11 +1825,11 @@ History { "boundElements": [], }, }, - "id166" => Delta { + "id174" => Delta { "deleted": { "boundElements": [ { - "id": "id167", + "id": "id175", "type": "arrow", }, ], @@ -1969,7 +1969,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl "frameId": null, "groupIds": [], "height": 100, - "id": "id168", + "id": "id176", "index": "a0", "isDeleted": false, "link": null, @@ -2001,7 +2001,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl "frameId": null, "groupIds": [], "height": 100, - "id": "id169", + "id": "id177", "index": "a1", "isDeleted": false, "link": null, @@ -2043,7 +2043,7 @@ History { "elementsChange": ElementsChange { "added": Map {}, "removed": Map { - "id168" => Delta { + "id176" => Delta { "deleted": { "angle": 0, "backgroundColor": "transparent", @@ -2074,7 +2074,7 @@ History { "isDeleted": true, }, }, - "id169" => Delta { + "id177" => Delta { "deleted": { "angle": 0, "backgroundColor": "transparent", @@ -2198,7 +2198,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl "scrollX": 0, "scrollY": 0, "selectedElementIds": { - "id172": true, + "id180": true, }, "selectedElementsAreBeingDragged": false, "selectedGroupIds": {}, @@ -2232,7 +2232,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl "backgroundColor": "transparent", "boundElements": [ { - "id": "id172", + "id": "id180", "type": "arrow", }, ], @@ -2241,7 +2241,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl "frameId": null, "groupIds": [], "height": 100, - "id": "id170", + "id": "id178", "index": "a0", "isDeleted": false, "link": null, @@ -2269,7 +2269,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl "backgroundColor": "transparent", "boundElements": [ { - "id": "id172", + "id": "id180", "type": "arrow", }, ], @@ -2278,7 +2278,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl "frameId": null, "groupIds": [], "height": 100, - "id": "id171", + "id": "id179", "index": "a1", "isDeleted": false, "link": null, @@ -2309,7 +2309,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl "elbowed": false, "endArrowhead": "arrow", "endBinding": { - "elementId": "id171", + "elementId": "id179", "fixedPoint": null, "focus": 0, "gap": 1, @@ -2318,7 +2318,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl "frameId": null, "groupIds": [], "height": "408.19672", - "id": "id172", + "id": "id180", "index": "a2", "isDeleted": false, "lastCommittedPoint": null, @@ -2341,7 +2341,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl }, "startArrowhead": null, "startBinding": { - "elementId": "id170", + "elementId": "id178", "fixedPoint": null, "focus": 0, "gap": 1, @@ -2378,7 +2378,7 @@ History { "elementsChange": ElementsChange { "added": Map {}, "removed": Map { - "id170" => Delta { + "id178" => Delta { "deleted": { "angle": 0, "backgroundColor": "transparent", @@ -2409,7 +2409,7 @@ History { "isDeleted": true, }, }, - "id171" => Delta { + "id179" => Delta { "deleted": { "angle": 0, "backgroundColor": "transparent", @@ -2449,9 +2449,9 @@ History { "delta": Delta { "deleted": { "selectedElementIds": { - "id172": true, + "id180": true, }, - "selectedLinearElementId": "id172", + "selectedLinearElementId": "id180", }, "inserted": { "selectedElementIds": {}, @@ -2462,7 +2462,7 @@ History { "elementsChange": ElementsChange { "added": Map {}, "removed": Map { - "id172" => Delta { + "id180" => Delta { "deleted": { "angle": 0, "backgroundColor": "transparent", @@ -2471,7 +2471,7 @@ History { "elbowed": false, "endArrowhead": "arrow", "endBinding": { - "elementId": "id171", + "elementId": "id179", "fixedPoint": null, "focus": 0, "gap": 1, @@ -2502,7 +2502,7 @@ History { }, "startArrowhead": null, "startBinding": { - "elementId": "id170", + "elementId": "id178", "fixedPoint": null, "focus": 0, "gap": 1, @@ -2521,11 +2521,11 @@ History { }, }, "updated": Map { - "id170" => Delta { + "id178" => Delta { "deleted": { "boundElements": [ { - "id": "id172", + "id": "id180", "type": "arrow", }, ], @@ -2534,11 +2534,11 @@ History { "boundElements": [], }, }, - "id171" => Delta { + "id179" => Delta { "deleted": { "boundElements": [ { - "id": "id172", + "id": "id180", "type": "arrow", }, ], @@ -2674,7 +2674,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and "backgroundColor": "transparent", "boundElements": [ { - "id": "id139", + "id": "id147", "type": "text", }, ], @@ -2683,7 +2683,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and "frameId": null, "groupIds": [], "height": 100, - "id": "id137", + "id": "id145", "index": "a0", "isDeleted": false, "link": null, @@ -2719,7 +2719,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and "frameId": null, "groupIds": [], "height": 100, - "id": "id138", + "id": "id146", "index": "a1", "isDeleted": false, "lineHeight": "1.25000", @@ -2752,7 +2752,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and "autoResize": true, "backgroundColor": "transparent", "boundElements": null, - "containerId": "id137", + "containerId": "id145", "customData": undefined, "fillStyle": "solid", "fontFamily": 5, @@ -2760,7 +2760,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and "frameId": null, "groupIds": [], "height": 25, - "id": "id139", + "id": "id147", "index": "a2", "isDeleted": false, "lineHeight": "1.25000", @@ -2807,7 +2807,7 @@ History { "added": Map {}, "removed": Map {}, "updated": Map { - "id137" => Delta { + "id145" => Delta { "deleted": { "isDeleted": false, }, @@ -2838,7 +2838,7 @@ History { "y": 10, }, }, - "id138" => Delta { + "id146" => Delta { "deleted": { "containerId": null, }, @@ -2974,7 +2974,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and "backgroundColor": "transparent", "boundElements": [ { - "id": "id142", + "id": "id150", "type": "text", }, ], @@ -2983,7 +2983,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and "frameId": null, "groupIds": [], "height": 100, - "id": "id140", + "id": "id148", "index": "Zz", "isDeleted": false, "link": null, @@ -3011,7 +3011,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and "autoResize": true, "backgroundColor": "transparent", "boundElements": null, - "containerId": "id140", + "containerId": "id148", "customData": undefined, "fillStyle": "solid", "fontFamily": 5, @@ -3019,7 +3019,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and "frameId": null, "groupIds": [], "height": 100, - "id": "id141", + "id": "id149", "index": "a0", "isDeleted": true, "lineHeight": "1.25000", @@ -3052,7 +3052,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and "autoResize": true, "backgroundColor": "transparent", "boundElements": null, - "containerId": "id140", + "containerId": "id148", "customData": undefined, "fillStyle": "solid", "fontFamily": 5, @@ -3060,7 +3060,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and "frameId": null, "groupIds": [], "height": 25, - "id": "id142", + "id": "id150", "index": "a1", "isDeleted": false, "lineHeight": "1.25000", @@ -3105,9 +3105,9 @@ History { }, "elementsChange": ElementsChange { "added": Map { - "id141" => Delta { + "id149" => Delta { "deleted": { - "containerId": "id140", + "containerId": "id148", "isDeleted": true, }, "inserted": { @@ -3118,14 +3118,14 @@ History { }, "removed": Map {}, "updated": Map { - "id140" => Delta { + "id148" => Delta { "deleted": { "boundElements": [], }, "inserted": { "boundElements": [ { - "id": "id141", + "id": "id149", "type": "text", }, ], @@ -3259,7 +3259,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and "backgroundColor": "transparent", "boundElements": [ { - "id": "id129", + "id": "id137", "type": "text", }, ], @@ -3268,7 +3268,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and "frameId": null, "groupIds": [], "height": 100, - "id": "id127", + "id": "id135", "index": "a0", "isDeleted": false, "link": null, @@ -3296,7 +3296,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and "autoResize": true, "backgroundColor": "transparent", "boundElements": null, - "containerId": "id127", + "containerId": "id135", "customData": undefined, "fillStyle": "solid", "fontFamily": 5, @@ -3304,7 +3304,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and "frameId": null, "groupIds": [], "height": 25, - "id": "id129", + "id": "id137", "index": "a0V", "isDeleted": false, "lineHeight": "1.25000", @@ -3345,7 +3345,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and "frameId": null, "groupIds": [], "height": 25, - "id": "id128", + "id": "id136", "index": "a1", "isDeleted": false, "lineHeight": "1.25000", @@ -3392,11 +3392,11 @@ History { "added": Map {}, "removed": Map {}, "updated": Map { - "id127" => Delta { + "id135" => Delta { "deleted": { "boundElements": [ { - "id": "id129", + "id": "id137", "type": "text", }, ], @@ -3404,23 +3404,23 @@ History { "inserted": { "boundElements": [ { - "id": "id128", + "id": "id136", "type": "text", }, ], }, }, - "id128" => Delta { + "id136" => Delta { "deleted": { "containerId": null, }, "inserted": { - "containerId": "id127", + "containerId": "id135", }, }, - "id129" => Delta { + "id137" => Delta { "deleted": { - "containerId": "id127", + "containerId": "id135", }, "inserted": { "containerId": null, @@ -3558,7 +3558,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and "frameId": null, "groupIds": [], "height": 100, - "id": "id130", + "id": "id138", "index": "a0", "isDeleted": false, "link": null, @@ -3586,7 +3586,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and "backgroundColor": "transparent", "boundElements": [ { - "id": "id131", + "id": "id139", "type": "text", }, ], @@ -3595,7 +3595,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and "frameId": null, "groupIds": [], "height": 60, - "id": "id132", + "id": "id140", "index": "a0V", "isDeleted": false, "link": null, @@ -3623,7 +3623,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and "autoResize": true, "backgroundColor": "transparent", "boundElements": null, - "containerId": "id132", + "containerId": "id140", "customData": undefined, "fillStyle": "solid", "fontFamily": 5, @@ -3631,7 +3631,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and "frameId": null, "groupIds": [], "height": 50, - "id": "id131", + "id": "id139", "index": "a1", "isDeleted": false, "lineHeight": "1.25000", @@ -3679,32 +3679,32 @@ History { "added": Map {}, "removed": Map {}, "updated": Map { - "id130" => Delta { + "id138" => Delta { "deleted": { "boundElements": [], }, "inserted": { "boundElements": [ { - "id": "id131", + "id": "id139", "type": "text", }, ], }, }, - "id131" => Delta { + "id139" => Delta { "deleted": { - "containerId": "id132", + "containerId": "id140", }, "inserted": { - "containerId": "id130", + "containerId": "id138", }, }, - "id132" => Delta { + "id140" => Delta { "deleted": { "boundElements": [ { - "id": "id131", + "id": "id139", "type": "text", }, ], @@ -3845,7 +3845,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and "frameId": null, "groupIds": [], "height": 100, - "id": "id125", + "id": "id133", "index": "a0", "isDeleted": false, "link": null, @@ -3881,7 +3881,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and "frameId": null, "groupIds": [], "height": 25, - "id": "id126", + "id": "id134", "index": "a1", "isDeleted": false, "lineHeight": "1.25000", @@ -3928,25 +3928,25 @@ History { "added": Map {}, "removed": Map {}, "updated": Map { - "id125" => Delta { + "id133" => Delta { "deleted": { "boundElements": [], }, "inserted": { "boundElements": [ { - "id": "id126", + "id": "id134", "type": "text", }, ], }, }, - "id126" => Delta { + "id134" => Delta { "deleted": { "containerId": null, }, "inserted": { - "containerId": "id125", + "containerId": "id133", }, }, }, @@ -4077,7 +4077,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and "backgroundColor": "transparent", "boundElements": [ { - "id": "id134", + "id": "id142", "type": "text", }, ], @@ -4086,7 +4086,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and "frameId": null, "groupIds": [], "height": 100, - "id": "id133", + "id": "id141", "index": "a0", "isDeleted": false, "link": null, @@ -4114,7 +4114,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and "autoResize": true, "backgroundColor": "transparent", "boundElements": null, - "containerId": "id133", + "containerId": "id141", "customData": undefined, "fillStyle": "solid", "fontFamily": 5, @@ -4122,7 +4122,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and "frameId": null, "groupIds": [], "height": 25, - "id": "id134", + "id": "id142", "index": "a1", "isDeleted": false, "lineHeight": "1.25000", @@ -4169,7 +4169,7 @@ History { "elementsChange": ElementsChange { "added": Map {}, "removed": Map { - "id133" => Delta { + "id141" => Delta { "deleted": { "angle": 0, "backgroundColor": "transparent", @@ -4202,9 +4202,9 @@ History { }, }, "updated": Map { - "id134" => Delta { + "id142" => Delta { "deleted": { - "containerId": "id133", + "containerId": "id141", }, "inserted": { "containerId": null, @@ -4337,7 +4337,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and "backgroundColor": "transparent", "boundElements": [ { - "id": "id136", + "id": "id144", "type": "text", }, ], @@ -4346,7 +4346,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and "frameId": null, "groupIds": [], "height": 100, - "id": "id135", + "id": "id143", "index": "Zz", "isDeleted": false, "link": null, @@ -4374,7 +4374,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and "autoResize": true, "backgroundColor": "transparent", "boundElements": null, - "containerId": "id135", + "containerId": "id143", "customData": undefined, "fillStyle": "solid", "fontFamily": 5, @@ -4382,7 +4382,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and "frameId": null, "groupIds": [], "height": 25, - "id": "id136", + "id": "id144", "index": "a0", "isDeleted": false, "lineHeight": "1.25000", @@ -4429,13 +4429,13 @@ History { "elementsChange": ElementsChange { "added": Map {}, "removed": Map { - "id136" => Delta { + "id144" => Delta { "deleted": { "angle": 0, "autoResize": true, "backgroundColor": "transparent", "boundElements": null, - "containerId": "id135", + "containerId": "id143", "customData": undefined, "fillStyle": "solid", "fontFamily": 5, @@ -4471,11 +4471,11 @@ History { }, }, "updated": Map { - "id135" => Delta { + "id143" => Delta { "deleted": { "boundElements": [ { - "id": "id136", + "id": "id144", "type": "text", }, ], @@ -4611,7 +4611,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and "backgroundColor": "transparent", "boundElements": [ { - "id": "id150", + "id": "id158", "type": "text", }, ], @@ -4620,7 +4620,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and "frameId": null, "groupIds": [], "height": 100, - "id": "id149", + "id": "id157", "index": "Zz", "isDeleted": false, "link": null, @@ -4648,7 +4648,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and "autoResize": true, "backgroundColor": "transparent", "boundElements": null, - "containerId": "id149", + "containerId": "id157", "customData": undefined, "fillStyle": "solid", "fontFamily": 5, @@ -4656,7 +4656,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and "frameId": null, "groupIds": [], "height": 25, - "id": "id150", + "id": "id158", "index": "a0", "isDeleted": false, "lineHeight": "1.25000", @@ -4703,7 +4703,7 @@ History { "added": Map {}, "removed": Map {}, "updated": Map { - "id150" => Delta { + "id158" => Delta { "deleted": { "angle": 0, "x": 15, @@ -4843,7 +4843,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and "backgroundColor": "transparent", "boundElements": [ { - "id": "id148", + "id": "id156", "type": "text", }, ], @@ -4852,7 +4852,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and "frameId": null, "groupIds": [], "height": 100, - "id": "id147", + "id": "id155", "index": "a0", "isDeleted": false, "link": null, @@ -4880,7 +4880,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and "autoResize": true, "backgroundColor": "transparent", "boundElements": null, - "containerId": "id147", + "containerId": "id155", "customData": undefined, "fillStyle": "solid", "fontFamily": 5, @@ -4888,7 +4888,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and "frameId": null, "groupIds": [], "height": 25, - "id": "id148", + "id": "id156", "index": "a1", "isDeleted": false, "lineHeight": "1.25000", @@ -4936,7 +4936,7 @@ History { "added": Map {}, "removed": Map {}, "updated": Map { - "id147" => Delta { + "id155" => Delta { "deleted": { "angle": 90, "x": 200, @@ -5079,7 +5079,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and "frameId": null, "groupIds": [], "height": 100, - "id": "id143", + "id": "id151", "index": "a0", "isDeleted": false, "link": null, @@ -5107,7 +5107,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and "autoResize": true, "backgroundColor": "transparent", "boundElements": null, - "containerId": "id143", + "containerId": "id151", "customData": undefined, "fillStyle": "solid", "fontFamily": 5, @@ -5115,7 +5115,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and "frameId": null, "groupIds": [], "height": 100, - "id": "id144", + "id": "id152", "index": "a1", "isDeleted": true, "lineHeight": "1.25000", @@ -5162,7 +5162,7 @@ History { "elementsChange": ElementsChange { "added": Map {}, "removed": Map { - "id143" => Delta { + "id151" => Delta { "deleted": { "boundElements": [], "isDeleted": false, @@ -5170,7 +5170,7 @@ History { "inserted": { "boundElements": [ { - "id": "id144", + "id": "id152", "type": "text", }, ], @@ -5305,7 +5305,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and "backgroundColor": "transparent", "boundElements": [ { - "id": "id146", + "id": "id154", "type": "text", }, ], @@ -5314,7 +5314,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and "frameId": null, "groupIds": [], "height": 100, - "id": "id145", + "id": "id153", "index": "Zz", "isDeleted": true, "link": null, @@ -5350,7 +5350,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and "frameId": null, "groupIds": [], "height": 100, - "id": "id146", + "id": "id154", "index": "a0", "isDeleted": false, "lineHeight": "1.25000", @@ -5397,13 +5397,13 @@ History { "elementsChange": ElementsChange { "added": Map {}, "removed": Map { - "id146" => Delta { + "id154" => Delta { "deleted": { "containerId": null, "isDeleted": false, }, "inserted": { - "containerId": "id145", + "containerId": "id153", "isDeleted": true, }, }, @@ -5539,7 +5539,7 @@ exports[`history > multiplayer undo/redo > conflicts in frames and their childre "frameId": null, "groupIds": [], "height": 100, - "id": "id174", + "id": "id182", "index": "Zz", "isDeleted": false, "link": null, @@ -5571,7 +5571,7 @@ exports[`history > multiplayer undo/redo > conflicts in frames and their childre "frameId": null, "groupIds": [], "height": 500, - "id": "id173", + "id": "id181", "index": "a0", "isDeleted": true, "link": null, @@ -5614,7 +5614,7 @@ History { "elementsChange": ElementsChange { "added": Map {}, "removed": Map { - "id174" => Delta { + "id182" => Delta { "deleted": { "angle": 0, "backgroundColor": "transparent", @@ -5660,9 +5660,9 @@ History { "added": Map {}, "removed": Map {}, "updated": Map { - "id174" => Delta { + "id182" => Delta { "deleted": { - "frameId": "id173", + "frameId": "id181", }, "inserted": { "frameId": null, @@ -5756,7 +5756,7 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh "penMode": false, "pendingImageElementId": null, "previousSelectedElementIds": { - "id102": true, + "id110": true, }, "resizingElement": null, "scrollX": 0, @@ -5800,7 +5800,7 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh "A", ], "height": 100, - "id": "id101", + "id": "id109", "index": "a0", "isDeleted": false, "link": null, @@ -5834,7 +5834,7 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh "A", ], "height": 100, - "id": "id102", + "id": "id110", "index": "a1", "isDeleted": true, "link": null, @@ -5871,8 +5871,8 @@ History { "delta": Delta { "deleted": { "selectedElementIds": { - "id101": true, - "id102": true, + "id109": true, + "id110": true, }, "selectedGroupIds": { "A": true, @@ -5888,7 +5888,7 @@ History { "added": Map {}, "removed": Map {}, "updated": Map { - "id101" => Delta { + "id109" => Delta { "deleted": { "angle": 0, "backgroundColor": "transparent", @@ -5921,7 +5921,7 @@ History { "isDeleted": true, }, }, - "id102" => Delta { + "id110" => Delta { "deleted": { "angle": 0, "backgroundColor": "transparent", @@ -5968,7 +5968,7 @@ History { "inserted": { "editingGroupId": null, "selectedElementIds": { - "id101": true, + "id109": true, }, "selectedGroupIds": { "A": true, @@ -5992,7 +5992,7 @@ History { "inserted": { "editingGroupId": "A", "selectedElementIds": { - "id102": true, + "id110": true, }, }, }, @@ -6088,7 +6088,7 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh "penMode": false, "pendingImageElementId": null, "previousSelectedElementIds": { - "id89": true, + "id97": true, }, "resizingElement": null, "scrollX": 0, @@ -6130,7 +6130,7 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh "frameId": null, "groupIds": [], "height": 10, - "id": "id87", + "id": "id95", "index": "a0", "isDeleted": false, "link": null, @@ -6162,7 +6162,7 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh "frameId": null, "groupIds": [], "height": 10, - "id": "id88", + "id": "id96", "index": "a1", "isDeleted": true, "link": null, @@ -6194,7 +6194,7 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh "frameId": null, "groupIds": [], "height": 10, - "id": "id89", + "id": "id97", "index": "a2", "isDeleted": true, "link": null, @@ -6231,7 +6231,7 @@ History { "delta": Delta { "deleted": { "selectedElementIds": { - "id87": true, + "id95": true, }, }, "inserted": { @@ -6242,7 +6242,7 @@ History { "elementsChange": ElementsChange { "added": Map {}, "removed": Map { - "id87" => Delta { + "id95" => Delta { "deleted": { "angle": 0, "backgroundColor": "transparent", @@ -6282,12 +6282,12 @@ History { "delta": Delta { "deleted": { "selectedElementIds": { - "id88": true, + "id96": true, }, }, "inserted": { "selectedElementIds": { - "id87": true, + "id95": true, }, }, }, @@ -6296,7 +6296,7 @@ History { "added": Map {}, "removed": Map {}, "updated": Map { - "id88" => Delta { + "id96" => Delta { "deleted": { "angle": 0, "backgroundColor": "#ffc9c9", @@ -6341,7 +6341,7 @@ History { "added": Map {}, "removed": Map {}, "updated": Map { - "id88" => Delta { + "id96" => Delta { "deleted": { "backgroundColor": "#ffc9c9", }, @@ -6357,12 +6357,12 @@ History { "delta": Delta { "deleted": { "selectedElementIds": { - "id89": true, + "id97": true, }, }, "inserted": { "selectedElementIds": { - "id88": true, + "id96": true, }, }, }, @@ -6371,7 +6371,7 @@ History { "added": Map {}, "removed": Map {}, "updated": Map { - "id89" => Delta { + "id97" => Delta { "deleted": { "angle": 0, "backgroundColor": "#ffc9c9", @@ -6416,7 +6416,7 @@ History { "added": Map {}, "removed": Map {}, "updated": Map { - "id89" => Delta { + "id97" => Delta { "deleted": { "x": 50, "y": 50, @@ -6514,14 +6514,14 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh "penMode": false, "pendingImageElementId": null, "previousSelectedElementIds": { - "id92": true, + "id100": true, }, "resizingElement": null, "scrollX": 0, "scrollY": 0, "selectedElementIds": { - "id92": true, - "id93": true, + "id100": true, + "id101": true, }, "selectedElementsAreBeingDragged": false, "selectedGroupIds": {}, @@ -6559,7 +6559,7 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh "frameId": null, "groupIds": [], "height": 100, - "id": "id91", + "id": "id99", "index": "a0", "isDeleted": false, "link": null, @@ -6591,7 +6591,7 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh "frameId": null, "groupIds": [], "height": 100, - "id": "id92", + "id": "id100", "index": "a1", "isDeleted": false, "link": null, @@ -6623,7 +6623,7 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh "frameId": null, "groupIds": [], "height": 100, - "id": "id93", + "id": "id101", "index": "a2", "isDeleted": false, "link": null, @@ -6660,7 +6660,7 @@ History { "delta": Delta { "deleted": { "selectedElementIds": { - "id91": true, + "id99": true, }, }, "inserted": { @@ -6671,7 +6671,7 @@ History { "elementsChange": ElementsChange { "added": Map {}, "removed": Map { - "id91" => Delta { + "id99" => Delta { "deleted": { "angle": 0, "backgroundColor": "transparent", @@ -6702,7 +6702,7 @@ History { "isDeleted": true, }, }, - "id92" => Delta { + "id100" => Delta { "deleted": { "angle": 0, "backgroundColor": "transparent", @@ -6733,7 +6733,7 @@ History { "isDeleted": true, }, }, - "id93" => Delta { + "id101" => Delta { "deleted": { "angle": 0, "backgroundColor": "transparent", @@ -6773,12 +6773,12 @@ History { "delta": Delta { "deleted": { "selectedElementIds": { - "id92": true, + "id100": true, }, }, "inserted": { "selectedElementIds": { - "id91": true, + "id99": true, }, }, }, @@ -6794,7 +6794,7 @@ History { "delta": Delta { "deleted": { "selectedElementIds": { - "id93": true, + "id101": true, }, }, "inserted": { @@ -6900,10 +6900,10 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh "scrollX": 0, "scrollY": 0, "selectedElementIds": { - "id100": true, - "id97": true, - "id98": true, - "id99": true, + "id105": true, + "id106": true, + "id107": true, + "id108": true, }, "selectedElementsAreBeingDragged": false, "selectedGroupIds": { @@ -6946,7 +6946,7 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh "A", ], "height": 100, - "id": "id97", + "id": "id105", "index": "a0", "isDeleted": false, "link": null, @@ -6980,7 +6980,7 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh "A", ], "height": 100, - "id": "id98", + "id": "id106", "index": "a1", "isDeleted": false, "link": null, @@ -7014,7 +7014,7 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh "B", ], "height": 100, - "id": "id99", + "id": "id107", "index": "a2", "isDeleted": false, "link": null, @@ -7048,7 +7048,7 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh "B", ], "height": 100, - "id": "id100", + "id": "id108", "index": "a3", "isDeleted": false, "link": null, @@ -7085,8 +7085,8 @@ History { "delta": Delta { "deleted": { "selectedElementIds": { - "id97": true, - "id98": true, + "id105": true, + "id106": true, }, "selectedGroupIds": { "A": true, @@ -7109,8 +7109,8 @@ History { "delta": Delta { "deleted": { "selectedElementIds": { - "id100": true, - "id99": true, + "id107": true, + "id108": true, }, "selectedGroupIds": { "B": true, @@ -7256,7 +7256,7 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh "frameId": null, "groupIds": [], "height": 10, - "id": "id105", + "id": "id113", "index": "a0", "isDeleted": true, "lastCommittedPoint": [ @@ -7309,7 +7309,7 @@ History { "delta": Delta { "deleted": { "selectedElementIds": { - "id105": true, + "id113": true, }, }, "inserted": { @@ -7321,7 +7321,7 @@ History { "added": Map {}, "removed": Map {}, "updated": Map { - "id105" => Delta { + "id113" => Delta { "deleted": { "angle": 0, "backgroundColor": "transparent", @@ -7378,7 +7378,7 @@ History { "appStateChange": AppStateChange { "delta": Delta { "deleted": { - "selectedLinearElementId": "id105", + "selectedLinearElementId": "id113", }, "inserted": { "selectedLinearElementId": null, @@ -7395,7 +7395,7 @@ History { "appStateChange": AppStateChange { "delta": Delta { "deleted": { - "editingLinearElementId": "id105", + "editingLinearElementId": "id113", }, "inserted": { "editingLinearElementId": null, @@ -7416,8 +7416,8 @@ History { "selectedLinearElementId": null, }, "inserted": { - "editingLinearElementId": "id105", - "selectedLinearElementId": "id105", + "editingLinearElementId": "id113", + "selectedLinearElementId": "id113", }, }, }, @@ -7552,7 +7552,7 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh "frameId": null, "groupIds": [], "height": 10, - "id": "id86", + "id": "id94", "index": "a0", "isDeleted": true, "link": null, @@ -7589,7 +7589,7 @@ History { "delta": Delta { "deleted": { "selectedElementIds": { - "id86": true, + "id94": true, }, }, "inserted": { @@ -7601,7 +7601,7 @@ History { "added": Map {}, "removed": Map {}, "updated": Map { - "id86" => Delta { + "id94" => Delta { "deleted": { "angle": 0, "backgroundColor": "#ffec99", @@ -7646,7 +7646,7 @@ History { "added": Map {}, "removed": Map {}, "updated": Map { - "id86" => Delta { + "id94" => Delta { "deleted": { "backgroundColor": "#ffec99", }, @@ -7782,7 +7782,7 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh "frameId": null, "groupIds": [], "height": 100, - "id": "id111", + "id": "id119", "index": "a1", "isDeleted": true, "link": null, @@ -7814,7 +7814,7 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh "frameId": null, "groupIds": [], "height": 100, - "id": "id112", + "id": "id120", "index": "a3V", "isDeleted": true, "link": null, @@ -7846,7 +7846,7 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh "frameId": null, "groupIds": [], "height": 100, - "id": "id110", + "id": "id118", "index": "a4", "isDeleted": true, "link": null, @@ -7888,7 +7888,7 @@ History { "added": Map {}, "removed": Map {}, "updated": Map { - "id111" => Delta { + "id119" => Delta { "deleted": { "index": "a1", }, @@ -7907,14 +7907,14 @@ History { }, "inserted": { "selectedElementIds": { - "id111": true, + "id119": true, }, }, }, }, "elementsChange": ElementsChange { "added": Map { - "id110" => Delta { + "id118" => Delta { "deleted": { "isDeleted": true, }, @@ -7945,7 +7945,7 @@ History { "y": 10, }, }, - "id111" => Delta { + "id119" => Delta { "deleted": { "isDeleted": true, }, @@ -7976,7 +7976,7 @@ History { "y": 20, }, }, - "id112" => Delta { + "id120" => Delta { "deleted": { "isDeleted": true, }, @@ -8138,7 +8138,7 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh "frameId": null, "groupIds": [], "height": 100, - "id": "id106", + "id": "id114", "index": "Zx", "isDeleted": true, "link": null, @@ -8170,7 +8170,7 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh "frameId": null, "groupIds": [], "height": 100, - "id": "id108", + "id": "id116", "index": "Zy", "isDeleted": true, "link": null, @@ -8202,7 +8202,7 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh "frameId": null, "groupIds": [], "height": 100, - "id": "id107", + "id": "id115", "index": "a1", "isDeleted": true, "link": null, @@ -8244,7 +8244,7 @@ History { "added": Map {}, "removed": Map {}, "updated": Map { - "id107" => Delta { + "id115" => Delta { "deleted": { "index": "a1", }, @@ -8263,14 +8263,14 @@ History { }, "inserted": { "selectedElementIds": { - "id107": true, + "id115": true, }, }, }, }, "elementsChange": ElementsChange { "added": Map { - "id106" => Delta { + "id114" => Delta { "deleted": { "isDeleted": true, }, @@ -8301,7 +8301,7 @@ History { "y": 10, }, }, - "id107" => Delta { + "id115" => Delta { "deleted": { "isDeleted": true, }, @@ -8332,7 +8332,7 @@ History { "y": 20, }, }, - "id108" => Delta { + "id116" => Delta { "deleted": { "isDeleted": true, }, @@ -8454,15 +8454,15 @@ exports[`history > multiplayer undo/redo > should not let remote changes to inte "penMode": false, "pendingImageElementId": null, "previousSelectedElementIds": { - "id119": true, - "id120": true, + "id127": true, + "id128": true, }, "resizingElement": null, "scrollX": 0, "scrollY": 0, "selectedElementIds": { - "id119": true, - "id120": true, + "id127": true, + "id128": true, }, "selectedElementsAreBeingDragged": false, "selectedGroupIds": {}, @@ -8500,7 +8500,7 @@ exports[`history > multiplayer undo/redo > should not let remote changes to inte "frameId": null, "groupIds": [], "height": 10, - "id": "id119", + "id": "id127", "index": "a0", "isDeleted": false, "link": null, @@ -8532,7 +8532,7 @@ exports[`history > multiplayer undo/redo > should not let remote changes to inte "frameId": null, "groupIds": [], "height": 10, - "id": "id120", + "id": "id128", "index": "a1", "isDeleted": false, "link": null, @@ -8564,7 +8564,7 @@ exports[`history > multiplayer undo/redo > should not let remote changes to inte "frameId": null, "groupIds": [], "height": 100, - "id": "id124", + "id": "id132", "index": "a2", "isDeleted": false, "link": null, @@ -8601,7 +8601,7 @@ History { "delta": Delta { "deleted": { "selectedElementIds": { - "id119": true, + "id127": true, }, }, "inserted": { @@ -8612,7 +8612,7 @@ History { "elementsChange": ElementsChange { "added": Map {}, "removed": Map { - "id119" => Delta { + "id127" => Delta { "deleted": { "angle": 0, "backgroundColor": "transparent", @@ -8652,12 +8652,12 @@ History { "delta": Delta { "deleted": { "selectedElementIds": { - "id120": true, + "id128": true, }, }, "inserted": { "selectedElementIds": { - "id119": true, + "id127": true, }, }, }, @@ -8665,7 +8665,7 @@ History { "elementsChange": ElementsChange { "added": Map {}, "removed": Map { - "id120" => Delta { + "id128" => Delta { "deleted": { "angle": 0, "backgroundColor": "transparent", @@ -8705,12 +8705,12 @@ History { "delta": Delta { "deleted": { "selectedElementIds": { - "id119": true, + "id127": true, }, }, "inserted": { "selectedElementIds": { - "id120": true, + "id128": true, }, }, }, @@ -8726,7 +8726,7 @@ History { "delta": Delta { "deleted": { "selectedElementIds": { - "id120": true, + "id128": true, }, }, "inserted": { @@ -8751,7 +8751,7 @@ History { "added": Map {}, "removed": Map {}, "updated": Map { - "id119" => Delta { + "id127" => Delta { "deleted": { "x": 90, "y": 90, @@ -8761,7 +8761,7 @@ History { "y": 10, }, }, - "id120" => Delta { + "id128" => Delta { "deleted": { "x": 110, "y": 110, @@ -8899,7 +8899,7 @@ exports[`history > multiplayer undo/redo > should not let remote changes to inte "frameId": null, "groupIds": [], "height": 50, - "id": "id114", + "id": "id122", "index": "a0", "isDeleted": false, "lastCommittedPoint": [ @@ -8958,7 +8958,7 @@ exports[`history > multiplayer undo/redo > should not let remote changes to inte "frameId": null, "groupIds": [], "height": 100, - "id": "id115", + "id": "id123", "index": "a1", "isDeleted": false, "link": null, @@ -9000,7 +9000,7 @@ History { "elementsChange": ElementsChange { "added": Map {}, "removed": Map { - "id114" => Delta { + "id122" => Delta { "deleted": { "angle": 0, "backgroundColor": "transparent", @@ -9151,7 +9151,7 @@ exports[`history > multiplayer undo/redo > should not let remote changes to inte "scrollX": 0, "scrollY": 0, "selectedElementIds": { - "id116": true, + "id124": true, }, "selectedElementsAreBeingDragged": false, "selectedGroupIds": {}, @@ -9189,7 +9189,7 @@ exports[`history > multiplayer undo/redo > should not let remote changes to inte "frameId": null, "groupIds": [], "height": 90, - "id": "id116", + "id": "id124", "index": "a0", "isDeleted": false, "link": null, @@ -9221,7 +9221,7 @@ exports[`history > multiplayer undo/redo > should not let remote changes to inte "frameId": null, "groupIds": [], "height": 100, - "id": "id118", + "id": "id126", "index": "a1", "isDeleted": false, "link": null, @@ -9258,7 +9258,7 @@ History { "delta": Delta { "deleted": { "selectedElementIds": { - "id116": true, + "id124": true, }, }, "inserted": { @@ -9269,7 +9269,7 @@ History { "elementsChange": ElementsChange { "added": Map {}, "removed": Map { - "id116" => Delta { + "id124" => Delta { "deleted": { "angle": 0, "backgroundColor": "transparent", @@ -9315,7 +9315,7 @@ History { "added": Map {}, "removed": Map {}, "updated": Map { - "id116" => Delta { + "id124" => Delta { "deleted": { "height": 90, "width": 90, @@ -9417,7 +9417,7 @@ exports[`history > multiplayer undo/redo > should not override remote changes on "scrollX": 0, "scrollY": 0, "selectedElementIds": { - "id73": true, + "id81": true, }, "selectedElementsAreBeingDragged": false, "selectedGroupIds": {}, @@ -9455,7 +9455,7 @@ exports[`history > multiplayer undo/redo > should not override remote changes on "frameId": null, "groupIds": [], "height": 10, - "id": "id73", + "id": "id81", "index": "a0", "isDeleted": false, "link": null, @@ -9487,7 +9487,7 @@ exports[`history > multiplayer undo/redo > should not override remote changes on "frameId": null, "groupIds": [], "height": 100, - "id": "id74", + "id": "id82", "index": "a1", "isDeleted": false, "link": null, @@ -9529,7 +9529,7 @@ History { "added": Map {}, "removed": Map {}, "updated": Map { - "id73" => Delta { + "id81" => Delta { "deleted": { "backgroundColor": "transparent", }, @@ -9547,7 +9547,7 @@ History { "delta": Delta { "deleted": { "selectedElementIds": { - "id73": true, + "id81": true, }, }, "inserted": { @@ -9558,7 +9558,7 @@ History { "elementsChange": ElementsChange { "added": Map {}, "removed": Map { - "id73" => Delta { + "id81" => Delta { "deleted": { "angle": 0, "backgroundColor": "transparent", @@ -9682,7 +9682,7 @@ exports[`history > multiplayer undo/redo > should not override remote changes on "scrollX": 0, "scrollY": 0, "selectedElementIds": { - "id75": true, + "id83": true, }, "selectedElementsAreBeingDragged": false, "selectedGroupIds": {}, @@ -9720,7 +9720,7 @@ exports[`history > multiplayer undo/redo > should not override remote changes on "frameId": null, "groupIds": [], "height": 10, - "id": "id75", + "id": "id83", "index": "a0", "isDeleted": false, "link": null, @@ -9757,7 +9757,7 @@ History { "delta": Delta { "deleted": { "selectedElementIds": { - "id75": true, + "id83": true, }, }, "inserted": { @@ -9768,7 +9768,7 @@ History { "elementsChange": ElementsChange { "added": Map {}, "removed": Map { - "id75" => Delta { + "id83" => Delta { "deleted": { "angle": 0, "backgroundColor": "transparent", @@ -9814,7 +9814,7 @@ History { "added": Map {}, "removed": Map {}, "updated": Map { - "id75" => Delta { + "id83" => Delta { "deleted": { "backgroundColor": "#ffc9c9", }, @@ -9956,7 +9956,7 @@ exports[`history > multiplayer undo/redo > should override remotely added groups "B", ], "height": 100, - "id": "id80", + "id": "id88", "index": "a0", "isDeleted": false, "link": null, @@ -9991,7 +9991,7 @@ exports[`history > multiplayer undo/redo > should override remotely added groups "B", ], "height": 100, - "id": "id81", + "id": "id89", "index": "a1", "isDeleted": false, "link": null, @@ -10025,7 +10025,7 @@ exports[`history > multiplayer undo/redo > should override remotely added groups "B", ], "height": 100, - "id": "id82", + "id": "id90", "index": "a2", "isDeleted": false, "link": null, @@ -10059,7 +10059,7 @@ exports[`history > multiplayer undo/redo > should override remotely added groups "B", ], "height": 100, - "id": "id83", + "id": "id91", "index": "a3", "isDeleted": false, "link": null, @@ -10102,7 +10102,7 @@ History { "added": Map {}, "removed": Map {}, "updated": Map { - "id80" => Delta { + "id88" => Delta { "deleted": { "groupIds": [ "A", @@ -10113,7 +10113,7 @@ History { "groupIds": [], }, }, - "id81" => Delta { + "id89" => Delta { "deleted": { "groupIds": [ "A", @@ -10216,7 +10216,7 @@ exports[`history > multiplayer undo/redo > should override remotely added points "scrollX": 0, "scrollY": 0, "selectedElementIds": { - "id84": true, + "id92": true, }, "selectedElementsAreBeingDragged": false, "selectedGroupIds": {}, @@ -10257,7 +10257,7 @@ exports[`history > multiplayer undo/redo > should override remotely added points "frameId": null, "groupIds": [], "height": 30, - "id": "id84", + "id": "id92", "index": "a0", "isDeleted": false, "lastCommittedPoint": [ @@ -10322,7 +10322,7 @@ History { "delta": Delta { "deleted": { "selectedElementIds": { - "id84": true, + "id92": true, }, }, "inserted": { @@ -10333,7 +10333,7 @@ History { "elementsChange": ElementsChange { "added": Map {}, "removed": Map { - "id84" => Delta { + "id92" => Delta { "deleted": { "angle": 0, "backgroundColor": "transparent", @@ -10398,7 +10398,7 @@ History { "added": Map {}, "removed": Map {}, "updated": Map { - "id84" => Delta { + "id92" => Delta { "deleted": { "height": 30, "lastCommittedPoint": [ @@ -10455,7 +10455,7 @@ History { "appStateChange": AppStateChange { "delta": Delta { "deleted": { - "selectedLinearElementId": "id84", + "selectedLinearElementId": "id92", }, "inserted": { "selectedLinearElementId": null, @@ -10593,7 +10593,7 @@ exports[`history > multiplayer undo/redo > should redistribute deltas when eleme "frameId": null, "groupIds": [], "height": 10, - "id": "id85", + "id": "id93", "index": "a0", "isDeleted": false, "link": null, @@ -10630,7 +10630,7 @@ History { "delta": Delta { "deleted": { "selectedElementIds": { - "id85": true, + "id93": true, }, }, "inserted": { @@ -10641,7 +10641,7 @@ History { "elementsChange": ElementsChange { "added": Map {}, "removed": Map { - "id85" => Delta { + "id93" => Delta { "deleted": { "angle": 0, "backgroundColor": "#ffec99", @@ -10684,7 +10684,7 @@ History { }, "inserted": { "selectedElementIds": { - "id85": true, + "id93": true, }, }, }, @@ -10693,7 +10693,7 @@ History { "added": Map {}, "removed": Map {}, "updated": Map { - "id85" => Delta { + "id93" => Delta { "deleted": { "isDeleted": false, }, @@ -11247,7 +11247,7 @@ exports[`history > multiplayer undo/redo > should update history entries after r "scrollX": 0, "scrollY": 0, "selectedElementIds": { - "id76": true, + "id84": true, }, "selectedElementsAreBeingDragged": false, "selectedGroupIds": {}, @@ -11285,7 +11285,7 @@ exports[`history > multiplayer undo/redo > should update history entries after r "frameId": null, "groupIds": [], "height": 10, - "id": "id76", + "id": "id84", "index": "a0", "isDeleted": false, "link": null, @@ -11327,7 +11327,7 @@ History { "added": Map {}, "removed": Map {}, "updated": Map { - "id76" => Delta { + "id84" => Delta { "deleted": { "backgroundColor": "#d0bfff", }, @@ -11349,7 +11349,7 @@ History { "added": Map {}, "removed": Map {}, "updated": Map { - "id76" => Delta { + "id84" => Delta { "deleted": { "backgroundColor": "transparent", }, @@ -11367,7 +11367,7 @@ History { "delta": Delta { "deleted": { "selectedElementIds": { - "id76": true, + "id84": true, }, }, "inserted": { @@ -11378,7 +11378,7 @@ History { "elementsChange": ElementsChange { "added": Map {}, "removed": Map { - "id76" => Delta { + "id84" => Delta { "deleted": { "angle": 0, "backgroundColor": "transparent", @@ -11570,7 +11570,7 @@ exports[`history > singleplayer undo/redo > remounting undo/redo buttons should "frameId": null, "groupIds": [], "height": 10, - "id": "id72", + "id": "id80", "index": "a1", "isDeleted": true, "link": null, @@ -11609,14 +11609,14 @@ History { }, "inserted": { "selectedElementIds": { - "id72": true, + "id80": true, }, }, }, }, "elementsChange": ElementsChange { "added": Map { - "id72" => Delta { + "id80" => Delta { "deleted": { "isDeleted": true, }, @@ -12634,7 +12634,7 @@ exports[`history > singleplayer undo/redo > should disable undo/redo buttons whe "scrollX": 0, "scrollY": 0, "selectedElementIds": { - "id70": true, + "id78": true, }, "selectedElementsAreBeingDragged": false, "selectedGroupIds": {}, @@ -12704,7 +12704,7 @@ exports[`history > singleplayer undo/redo > should disable undo/redo buttons whe "frameId": null, "groupIds": [], "height": 10, - "id": "id70", + "id": "id78", "index": "a1", "isDeleted": false, "link": null, @@ -12741,7 +12741,7 @@ History { "delta": Delta { "deleted": { "selectedElementIds": { - "id70": true, + "id78": true, }, }, "inserted": { @@ -12752,7 +12752,7 @@ History { "elementsChange": ElementsChange { "added": Map {}, "removed": Map { - "id70" => Delta { + "id78" => Delta { "deleted": { "angle": 0, "backgroundColor": "transparent", @@ -14796,790 +14796,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding "type": "selection", }, "collaborators": Map {}, - "contextMenu": { - "items": [ - "separator", - { - "icon": , - "keyTest": [Function], - "label": "labels.cut", - "name": "cut", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "icon": , - "keyTest": undefined, - "label": "labels.copy", - "name": "copy", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "keyTest": undefined, - "label": "labels.paste", - "name": "paste", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "label": "labels.selectAllElementsInFrame", - "name": "selectAllElementsInFrame", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "canvas", - }, - }, - { - "label": "labels.removeAllElementsFromFrame", - "name": "removeAllElementsFromFrame", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "history", - }, - }, - "separator", - { - "icon": , - "keyTest": [Function], - "keywords": [ - "png", - "clipboard", - "copy", - ], - "label": "labels.copyAsPng", - "name": "copyAsPng", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "icon": , - "keywords": [ - "svg", - "clipboard", - "copy", - ], - "label": "labels.copyAsSvg", - "name": "copyAsSvg", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "keywords": [ - "text", - "clipboard", - "copy", - ], - "label": "labels.copyText", - "name": "copyText", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", - }, - }, - "separator", - { - "icon": , - "keyTest": [Function], - "label": "labels.copyStyles", - "name": "copyStyles", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "icon": , - "keyTest": [Function], - "label": "labels.pasteStyles", - "name": "pasteStyles", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - "separator", - { - "PanelComponent": [Function], - "icon": [Function], - "keyTest": [Function], - "label": "labels.group", - "name": "group", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "icon": null, - "label": "labels.autoResize", - "name": "autoResize", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "label": "labels.unbindText", - "name": "unbindText", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "label": "labels.bindText", - "name": "bindText", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "label": "labels.createContainerFromText", - "name": "wrapTextInContainer", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "PanelComponent": [Function], - "icon": [Function], - "keyTest": [Function], - "label": "labels.ungroup", - "name": "ungroup", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", - }, - }, - "separator", - { - "label": "labels.addToLibrary", - "name": "addToLibrary", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - "separator", - { - "PanelComponent": [Function], - "icon": , - "keyPriority": 40, - "keyTest": [Function], - "keywords": [ - "move down", - "zindex", - "layer", - ], - "label": "labels.sendBackward", - "name": "sendBackward", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "PanelComponent": [Function], - "icon": , - "keyPriority": 40, - "keyTest": [Function], - "keywords": [ - "move up", - "zindex", - "layer", - ], - "label": "labels.bringForward", - "name": "bringForward", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "PanelComponent": [Function], - "icon": , - "keyTest": [Function], - "keywords": [ - "move down", - "zindex", - "layer", - ], - "label": "labels.sendToBack", - "name": "sendToBack", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "PanelComponent": [Function], - "icon": , - "keyTest": [Function], - "keywords": [ - "move up", - "zindex", - "layer", - ], - "label": "labels.bringToFront", - "name": "bringToFront", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - "separator", - { - "icon": , - "keyTest": [Function], - "label": "labels.flipHorizontal", - "name": "flipHorizontal", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "icon": , - "keyTest": [Function], - "label": "labels.flipVertical", - "name": "flipVertical", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - "separator", - { - "PanelComponent": [Function], - "category": "Elements", - "keywords": [ - "line", - ], - "label": [Function], - "name": "toggleLinearEditor", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "PanelComponent": [Function], - "icon": , - "keyTest": [Function], - "label": [Function], - "name": "hyperlink", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "action": "click", - "category": "hyperlink", - }, - }, - { - "PanelComponent": [Function], - "icon": , - "keyTest": [Function], - "label": "labels.duplicateSelection", - "name": "duplicateSelection", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "icon": [Function], - "keyTest": [Function], - "label": [Function], - "name": "toggleElementLock", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", - }, - }, - "separator", - { - "PanelComponent": [Function], - "icon": , - "keyTest": [Function], - "label": "labels.delete", - "name": "deleteSelectedElements", - "perform": [Function], - "trackEvent": { - "action": "delete", - "category": "element", - }, - }, - ], - "left": 0, - "top": 0, - }, + "contextMenu": null, "currentChartType": "bar", "currentHoveredFontFamily": null, "currentItemArrowType": "round", @@ -15646,14 +14863,13 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding "penMode": false, "pendingImageElementId": null, "previousSelectedElementIds": { - "id49": true, + "id50": true, }, "resizingElement": null, "scrollX": 0, "scrollY": 0, "selectedElementIds": { - "id49": true, - "id50": true, + "id55": true, }, "selectedElementsAreBeingDragged": false, "selectedGroupIds": {}, @@ -15685,13 +14901,22 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding { "angle": 0, "backgroundColor": "transparent", - "boundElements": null, + "boundElements": [ + { + "id": "id51", + "type": "text", + }, + { + "id": "id55", + "type": "arrow", + }, + ], "customData": undefined, "fillStyle": "solid", "frameId": null, "groupIds": [], "height": 100, - "id": "id49", + "id": "id50", "index": "a0", "isDeleted": false, "link": null, @@ -15706,7 +14931,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding "strokeWidth": 2, "type": "rectangle", "updated": 1, - "version": 2, + "version": 8, "width": 100, "x": -100, "y": -50, @@ -15719,15 +14944,15 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding "autoResize": true, "backgroundColor": "transparent", "boundElements": null, - "containerId": null, + "containerId": "id50", "customData": undefined, "fillStyle": "solid", "fontFamily": 5, "fontSize": 20, "frameId": null, "groupIds": [], - "height": 100, - "id": "id50", + "height": 25, + "id": "id51", "index": "a1", "isDeleted": false, "lineHeight": "1.25000", @@ -15743,14 +14968,14 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding "strokeStyle": "solid", "strokeWidth": 2, "text": "ola", - "textAlign": "left", + "textAlign": "center", "type": "text", "updated": 1, - "version": 2, - "verticalAlign": "top", - "width": 100, - "x": -200, - "y": -200, + "version": 6, + "verticalAlign": "middle", + "width": 30, + "x": -65, + "y": "-12.50000", } `; @@ -15758,13 +14983,18 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding { "angle": 0, "backgroundColor": "transparent", - "boundElements": null, + "boundElements": [ + { + "id": "id55", + "type": "arrow", + }, + ], "customData": undefined, "fillStyle": "solid", "frameId": null, "groupIds": [], "height": 100, - "id": "id51", + "id": "id52", "index": "a2", "isDeleted": false, "link": null, @@ -15779,13 +15009,71 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding "strokeWidth": 2, "type": "rectangle", "updated": 1, - "version": 2, + "version": 7, "width": 100, "x": 100, "y": -50, } `; +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] element 3 1`] = ` +{ + "angle": 0, + "backgroundColor": "transparent", + "boundElements": null, + "customData": undefined, + "elbowed": false, + "endArrowhead": "arrow", + "endBinding": { + "elementId": "id52", + "fixedPoint": null, + "focus": 0, + "gap": 1, + }, + "fillStyle": "solid", + "frameId": null, + "groupIds": [], + "height": 0, + "id": "id55", + "index": "a3", + "isDeleted": false, + "lastCommittedPoint": null, + "link": null, + "locked": false, + "opacity": 100, + "points": [ + [ + 0, + 0, + ], + [ + "98.00000", + 0, + ], + ], + "roughness": 1, + "roundness": { + "type": 2, + }, + "startArrowhead": null, + "startBinding": { + "elementId": "id50", + "fixedPoint": null, + "focus": 0, + "gap": 1, + }, + "strokeColor": "#1e1e1e", + "strokeStyle": "solid", + "strokeWidth": 2, + "type": "arrow", + "updated": 1, + "version": 10, + "width": "98.00000", + "x": 1, + "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] history 1`] = ` History { "onHistoryChangedEmitter": Emitter { @@ -15794,7 +15082,83 @@ History { [Function], ], }, - "redoStack": [], + "redoStack": [ + HistoryEntry { + "appStateChange": AppStateChange { + "delta": Delta { + "deleted": { + "selectedElementIds": { + "id55": true, + }, + }, + "inserted": { + "selectedElementIds": {}, + }, + }, + }, + "elementsChange": ElementsChange { + "added": Map {}, + "removed": Map { + "id55" => Delta { + "deleted": { + "isDeleted": false, + "points": [ + [ + 0, + 0, + ], + [ + 100, + 0, + ], + ], + }, + "inserted": { + "isDeleted": true, + "points": [ + [ + 0, + 0, + ], + [ + 100, + 0, + ], + ], + }, + }, + }, + "updated": Map { + "id50" => Delta { + "deleted": { + "boundElements": [ + { + "id": "id55", + "type": "arrow", + }, + ], + }, + "inserted": { + "boundElements": [], + }, + }, + "id52" => Delta { + "deleted": { + "boundElements": [ + { + "id": "id55", + "type": "arrow", + }, + ], + }, + "inserted": { + "boundElements": [], + }, + }, + }, + }, + }, + ], "undoStack": [ HistoryEntry { "appStateChange": AppStateChange { @@ -15806,7 +15170,7 @@ History { "elementsChange": ElementsChange { "added": Map {}, "removed": Map { - "id49" => Delta { + "id50" => Delta { "deleted": { "angle": 0, "backgroundColor": "transparent", @@ -15837,7 +15201,7 @@ History { "isDeleted": true, }, }, - "id50" => Delta { + "id51" => Delta { "deleted": { "angle": 0, "autoResize": true, @@ -15877,7 +15241,7 @@ History { "isDeleted": true, }, }, - "id51" => Delta { + "id52" => Delta { "deleted": { "angle": 0, "backgroundColor": "transparent", @@ -15917,7 +15281,7 @@ History { "delta": Delta { "deleted": { "selectedElementIds": { - "id49": true, + "id50": true, }, }, "inserted": { @@ -15936,7 +15300,7 @@ History { "delta": Delta { "deleted": { "selectedElementIds": { - "id50": true, + "id51": true, }, }, "inserted": { @@ -15950,812 +15314,190 @@ History { "updated": Map {}, }, }, - ], -} -`; - -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`] = `3`; - -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`] = `6`; - -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] appState 1`] = ` -{ - "activeEmbeddable": null, - "activeTool": { - "customType": null, - "lastActiveTool": null, - "locked": false, - "type": "selection", - }, - "collaborators": Map {}, - "contextMenu": { - "items": [ - "separator", - { - "icon": , - "keyTest": [Function], - "label": "labels.cut", - "name": "cut", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "icon": , - "keyTest": undefined, - "label": "labels.copy", - "name": "copy", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "keyTest": undefined, - "label": "labels.paste", - "name": "paste", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "label": "labels.selectAllElementsInFrame", - "name": "selectAllElementsInFrame", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "canvas", - }, - }, - { - "label": "labels.removeAllElementsFromFrame", - "name": "removeAllElementsFromFrame", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "history", - }, - }, - "separator", - { - "icon": , - "keyTest": [Function], - "keywords": [ - "png", - "clipboard", - "copy", - ], - "label": "labels.copyAsPng", - "name": "copyAsPng", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "icon": , - "keywords": [ - "svg", - "clipboard", - "copy", - ], - "label": "labels.copyAsSvg", - "name": "copyAsSvg", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "keywords": [ - "text", - "clipboard", - "copy", - ], - "label": "labels.copyText", - "name": "copyText", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", - }, - }, - "separator", - { - "icon": , - "keyTest": [Function], - "label": "labels.copyStyles", - "name": "copyStyles", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "icon": , - "keyTest": [Function], - "label": "labels.pasteStyles", - "name": "pasteStyles", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - "separator", - { - "PanelComponent": [Function], - "icon": [Function], - "keyTest": [Function], - "label": "labels.group", - "name": "group", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "icon": null, - "label": "labels.autoResize", - "name": "autoResize", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "label": "labels.unbindText", - "name": "unbindText", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "label": "labels.bindText", - "name": "bindText", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "label": "labels.createContainerFromText", - "name": "wrapTextInContainer", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "PanelComponent": [Function], - "icon": [Function], - "keyTest": [Function], - "label": "labels.ungroup", - "name": "ungroup", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", - }, - }, - "separator", - { - "label": "labels.addToLibrary", - "name": "addToLibrary", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - "separator", - { - "PanelComponent": [Function], - "icon": , - "keyPriority": 40, - "keyTest": [Function], - "keywords": [ - "move down", - "zindex", - "layer", - ], - "label": "labels.sendBackward", - "name": "sendBackward", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "PanelComponent": [Function], - "icon": , - "keyPriority": 40, - "keyTest": [Function], - "keywords": [ - "move up", - "zindex", - "layer", - ], - "label": "labels.bringForward", - "name": "bringForward", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "PanelComponent": [Function], - "icon": , - "keyTest": [Function], - "keywords": [ - "move down", - "zindex", - "layer", - ], - "label": "labels.sendToBack", - "name": "sendToBack", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "PanelComponent": [Function], - "icon": , - "keyTest": [Function], - "keywords": [ - "move up", - "zindex", - "layer", - ], - "label": "labels.bringToFront", - "name": "bringToFront", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - "separator", - { - "icon": , - "keyTest": [Function], - "label": "labels.flipHorizontal", - "name": "flipHorizontal", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "icon": , - "keyTest": [Function], - "label": "labels.flipVertical", - "name": "flipVertical", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - "separator", - { - "PanelComponent": [Function], - "category": "Elements", - "keywords": [ - "line", - ], - "label": [Function], - "name": "toggleLinearEditor", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "PanelComponent": [Function], - "icon": , - "keyTest": [Function], - "label": [Function], - "name": "hyperlink", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "action": "click", - "category": "hyperlink", - }, - }, - { - "PanelComponent": [Function], - "icon": , - "keyTest": [Function], - "label": "labels.duplicateSelection", - "name": "duplicateSelection", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "icon": [Function], - "keyTest": [Function], - "label": [Function], - "name": "toggleElementLock", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", - }, - }, - "separator", - { - "PanelComponent": [Function], - "icon": , - "keyTest": [Function], - "label": "labels.delete", - "name": "deleteSelectedElements", - "perform": [Function], - "trackEvent": { - "action": "delete", - "category": "element", - }, - }, - ], - "left": 0, - "top": 0, - }, - "currentChartType": "bar", - "currentHoveredFontFamily": null, - "currentItemArrowType": "round", - "currentItemBackgroundColor": "transparent", + HistoryEntry { + "appStateChange": AppStateChange { + "delta": Delta { + "deleted": { + "selectedElementIds": {}, + }, + "inserted": { + "selectedElementIds": { + "id51": true, + }, + }, + }, + }, + "elementsChange": ElementsChange { + "added": Map {}, + "removed": Map {}, + "updated": Map { + "id50" => Delta { + "deleted": { + "boundElements": [ + { + "id": "id51", + "type": "text", + }, + ], + }, + "inserted": { + "boundElements": [], + }, + }, + "id51" => Delta { + "deleted": { + "containerId": "id50", + "height": 25, + "textAlign": "center", + "verticalAlign": "middle", + "width": 30, + "x": -65, + "y": "-12.50000", + }, + "inserted": { + "containerId": null, + "height": 100, + "textAlign": "left", + "verticalAlign": "top", + "width": 100, + "x": -200, + "y": -200, + }, + }, + }, + }, + }, + HistoryEntry { + "appStateChange": AppStateChange { + "delta": Delta { + "deleted": { + "selectedElementIds": { + "id55": true, + }, + "selectedLinearElementId": "id55", + }, + "inserted": { + "selectedElementIds": { + "id50": true, + }, + "selectedLinearElementId": null, + }, + }, + }, + "elementsChange": ElementsChange { + "added": Map {}, + "removed": Map { + "id55" => Delta { + "deleted": { + "angle": 0, + "backgroundColor": "transparent", + "boundElements": null, + "customData": undefined, + "elbowed": false, + "endArrowhead": "arrow", + "endBinding": { + "elementId": "id52", + "fixedPoint": null, + "focus": 0, + "gap": 1, + }, + "fillStyle": "solid", + "frameId": null, + "groupIds": [], + "height": 0, + "index": "a3", + "isDeleted": false, + "lastCommittedPoint": null, + "link": null, + "locked": false, + "opacity": 100, + "points": [ + [ + 0, + 0, + ], + [ + 100, + 0, + ], + ], + "roughness": 1, + "roundness": { + "type": 2, + }, + "startArrowhead": null, + "startBinding": { + "elementId": "id50", + "fixedPoint": null, + "focus": 0, + "gap": 1, + }, + "strokeColor": "#1e1e1e", + "strokeStyle": "solid", + "strokeWidth": 2, + "type": "arrow", + "width": 100, + "x": 0, + "y": 0, + }, + "inserted": { + "isDeleted": true, + }, + }, + }, + "updated": Map { + "id50" => Delta { + "deleted": { + "boundElements": [ + { + "id": "id55", + "type": "arrow", + }, + ], + }, + "inserted": { + "boundElements": [], + }, + }, + "id52" => Delta { + "deleted": { + "boundElements": [ + { + "id": "id55", + "type": "arrow", + }, + ], + }, + "inserted": { + "boundElements": [], + }, + }, + }, + }, + }, + ], +} +`; + +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`] = `13`; + +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] appState 1`] = ` +{ + "activeEmbeddable": null, + "activeTool": { + "customType": null, + "lastActiveTool": null, + "locked": false, + "type": "selection", + }, + "collaborators": Map {}, + "contextMenu": null, + "currentChartType": "bar", + "currentHoveredFontFamily": null, + "currentItemArrowType": "round", + "currentItemBackgroundColor": "transparent", "currentItemEndArrowhead": "arrow", "currentItemFillStyle": "solid", "currentItemFontFamily": 5, @@ -16824,8 +15566,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding "scrollX": 0, "scrollY": 0, "selectedElementIds": { - "id44": true, - "id45": true, + "id49": true, }, "selectedElementsAreBeingDragged": false, "selectedGroupIds": {}, @@ -16857,7 +15598,16 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding { "angle": 0, "backgroundColor": "transparent", - "boundElements": null, + "boundElements": [ + { + "id": "id45", + "type": "text", + }, + { + "id": "id49", + "type": "arrow", + }, + ], "customData": undefined, "fillStyle": "solid", "frameId": null, @@ -16878,7 +15628,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding "strokeWidth": 2, "type": "rectangle", "updated": 1, - "version": 2, + "version": 8, "width": 100, "x": -100, "y": -50, @@ -16891,14 +15641,14 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding "autoResize": true, "backgroundColor": "transparent", "boundElements": null, - "containerId": null, + "containerId": "id44", "customData": undefined, "fillStyle": "solid", "fontFamily": 5, "fontSize": 20, "frameId": null, "groupIds": [], - "height": 100, + "height": 25, "id": "id45", "index": "a1", "isDeleted": false, @@ -16915,14 +15665,14 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding "strokeStyle": "solid", "strokeWidth": 2, "text": "ola", - "textAlign": "left", + "textAlign": "center", "type": "text", "updated": 1, - "version": 2, - "verticalAlign": "top", - "width": 100, - "x": -200, - "y": -200, + "version": 8, + "verticalAlign": "middle", + "width": 30, + "x": -65, + "y": "-12.50000", } `; @@ -16930,7 +15680,12 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding { "angle": 0, "backgroundColor": "transparent", - "boundElements": null, + "boundElements": [ + { + "id": "id49", + "type": "arrow", + }, + ], "customData": undefined, "fillStyle": "solid", "frameId": null, @@ -16951,13 +15706,71 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding "strokeWidth": 2, "type": "rectangle", "updated": 1, - "version": 2, + "version": 7, "width": 100, "x": 100, "y": -50, } `; +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] element 3 1`] = ` +{ + "angle": 0, + "backgroundColor": "transparent", + "boundElements": null, + "customData": undefined, + "elbowed": false, + "endArrowhead": "arrow", + "endBinding": { + "elementId": "id46", + "fixedPoint": null, + "focus": 0, + "gap": 1, + }, + "fillStyle": "solid", + "frameId": null, + "groupIds": [], + "height": 0, + "id": "id49", + "index": "a3", + "isDeleted": false, + "lastCommittedPoint": null, + "link": null, + "locked": false, + "opacity": 100, + "points": [ + [ + 0, + 0, + ], + [ + "98.00000", + 0, + ], + ], + "roughness": 1, + "roundness": { + "type": 2, + }, + "startArrowhead": null, + "startBinding": { + "elementId": "id44", + "fixedPoint": null, + "focus": 0, + "gap": 1, + }, + "strokeColor": "#1e1e1e", + "strokeStyle": "solid", + "strokeWidth": 2, + "type": "arrow", + "updated": 1, + "version": 10, + "width": "98.00000", + "x": 1, + "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] history 1`] = ` History { "onHistoryChangedEmitter": Emitter { @@ -17122,13 +15935,174 @@ History { "updated": Map {}, }, }, - ], -} + HistoryEntry { + "appStateChange": AppStateChange { + "delta": Delta { + "deleted": { + "selectedElementIds": {}, + }, + "inserted": { + "selectedElementIds": { + "id45": true, + }, + }, + }, + }, + "elementsChange": ElementsChange { + "added": Map {}, + "removed": Map {}, + "updated": Map { + "id44" => Delta { + "deleted": { + "boundElements": [ + { + "id": "id45", + "type": "text", + }, + ], + }, + "inserted": { + "boundElements": [], + }, + }, + "id45" => Delta { + "deleted": { + "containerId": "id44", + "height": 25, + "textAlign": "center", + "verticalAlign": "middle", + "width": 30, + "x": -65, + "y": "-12.50000", + }, + "inserted": { + "containerId": null, + "height": 100, + "textAlign": "left", + "verticalAlign": "top", + "width": 100, + "x": -200, + "y": -200, + }, + }, + }, + }, + }, + HistoryEntry { + "appStateChange": AppStateChange { + "delta": Delta { + "deleted": { + "selectedElementIds": { + "id49": true, + }, + "selectedLinearElementId": "id49", + }, + "inserted": { + "selectedElementIds": { + "id44": true, + }, + "selectedLinearElementId": null, + }, + }, + }, + "elementsChange": ElementsChange { + "added": Map {}, + "removed": Map { + "id49" => Delta { + "deleted": { + "angle": 0, + "backgroundColor": "transparent", + "boundElements": null, + "customData": undefined, + "elbowed": false, + "endArrowhead": "arrow", + "endBinding": { + "elementId": "id46", + "fixedPoint": null, + "focus": 0, + "gap": 1, + }, + "fillStyle": "solid", + "frameId": null, + "groupIds": [], + "height": 0, + "index": "a3", + "isDeleted": false, + "lastCommittedPoint": null, + "link": null, + "locked": false, + "opacity": 100, + "points": [ + [ + 0, + 0, + ], + [ + 100, + 0, + ], + ], + "roughness": 1, + "roundness": { + "type": 2, + }, + "startArrowhead": null, + "startBinding": { + "elementId": "id44", + "fixedPoint": null, + "focus": 0, + "gap": 1, + }, + "strokeColor": "#1e1e1e", + "strokeStyle": "solid", + "strokeWidth": 2, + "type": "arrow", + "width": 100, + "x": 0, + "y": 0, + }, + "inserted": { + "isDeleted": true, + }, + }, + }, + "updated": Map { + "id44" => Delta { + "deleted": { + "boundElements": [ + { + "id": "id49", + "type": "arrow", + }, + ], + }, + "inserted": { + "boundElements": [], + }, + }, + "id46" => Delta { + "deleted": { + "boundElements": [ + { + "id": "id49", + "type": "arrow", + }, + ], + }, + "inserted": { + "boundElements": [], + }, + }, + }, + }, + }, + ], +} `; -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`] = `3`; +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`] = `6`; +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`] = `13`; 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] appState 1`] = ` { @@ -17140,790 +16114,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding "type": "selection", }, "collaborators": Map {}, - "contextMenu": { - "items": [ - "separator", - { - "icon": , - "keyTest": [Function], - "label": "labels.cut", - "name": "cut", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "icon": , - "keyTest": undefined, - "label": "labels.copy", - "name": "copy", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "keyTest": undefined, - "label": "labels.paste", - "name": "paste", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "label": "labels.selectAllElementsInFrame", - "name": "selectAllElementsInFrame", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "canvas", - }, - }, - { - "label": "labels.removeAllElementsFromFrame", - "name": "removeAllElementsFromFrame", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "history", - }, - }, - "separator", - { - "icon": , - "keyTest": [Function], - "keywords": [ - "png", - "clipboard", - "copy", - ], - "label": "labels.copyAsPng", - "name": "copyAsPng", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "icon": , - "keywords": [ - "svg", - "clipboard", - "copy", - ], - "label": "labels.copyAsSvg", - "name": "copyAsSvg", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "keywords": [ - "text", - "clipboard", - "copy", - ], - "label": "labels.copyText", - "name": "copyText", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", - }, - }, - "separator", - { - "icon": , - "keyTest": [Function], - "label": "labels.copyStyles", - "name": "copyStyles", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "icon": , - "keyTest": [Function], - "label": "labels.pasteStyles", - "name": "pasteStyles", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - "separator", - { - "PanelComponent": [Function], - "icon": [Function], - "keyTest": [Function], - "label": "labels.group", - "name": "group", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "icon": null, - "label": "labels.autoResize", - "name": "autoResize", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "label": "labels.unbindText", - "name": "unbindText", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "label": "labels.bindText", - "name": "bindText", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "label": "labels.createContainerFromText", - "name": "wrapTextInContainer", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "PanelComponent": [Function], - "icon": [Function], - "keyTest": [Function], - "label": "labels.ungroup", - "name": "ungroup", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", - }, - }, - "separator", - { - "label": "labels.addToLibrary", - "name": "addToLibrary", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - "separator", - { - "PanelComponent": [Function], - "icon": , - "keyPriority": 40, - "keyTest": [Function], - "keywords": [ - "move down", - "zindex", - "layer", - ], - "label": "labels.sendBackward", - "name": "sendBackward", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "PanelComponent": [Function], - "icon": , - "keyPriority": 40, - "keyTest": [Function], - "keywords": [ - "move up", - "zindex", - "layer", - ], - "label": "labels.bringForward", - "name": "bringForward", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "PanelComponent": [Function], - "icon": , - "keyTest": [Function], - "keywords": [ - "move down", - "zindex", - "layer", - ], - "label": "labels.sendToBack", - "name": "sendToBack", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "PanelComponent": [Function], - "icon": , - "keyTest": [Function], - "keywords": [ - "move up", - "zindex", - "layer", - ], - "label": "labels.bringToFront", - "name": "bringToFront", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - "separator", - { - "icon": , - "keyTest": [Function], - "label": "labels.flipHorizontal", - "name": "flipHorizontal", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "icon": , - "keyTest": [Function], - "label": "labels.flipVertical", - "name": "flipVertical", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - "separator", - { - "PanelComponent": [Function], - "category": "Elements", - "keywords": [ - "line", - ], - "label": [Function], - "name": "toggleLinearEditor", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "PanelComponent": [Function], - "icon": , - "keyTest": [Function], - "label": [Function], - "name": "hyperlink", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "action": "click", - "category": "hyperlink", - }, - }, - { - "PanelComponent": [Function], - "icon": , - "keyTest": [Function], - "label": "labels.duplicateSelection", - "name": "duplicateSelection", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "icon": [Function], - "keyTest": [Function], - "label": [Function], - "name": "toggleElementLock", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", - }, - }, - "separator", - { - "PanelComponent": [Function], - "icon": , - "keyTest": [Function], - "label": "labels.delete", - "name": "deleteSelectedElements", - "perform": [Function], - "trackEvent": { - "action": "delete", - "category": "element", - }, - }, - ], - "left": 0, - "top": 0, - }, + "contextMenu": null, "currentChartType": "bar", "currentHoveredFontFamily": null, "currentItemArrowType": "round", @@ -17990,14 +16181,13 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding "penMode": false, "pendingImageElementId": null, "previousSelectedElementIds": { - "id54": true, + "id56": true, }, "resizingElement": null, "scrollX": 0, "scrollY": 0, "selectedElementIds": { - "id54": true, - "id55": true, + "id61": true, }, "selectedElementsAreBeingDragged": false, "selectedGroupIds": {}, @@ -18029,13 +16219,22 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding { "angle": 0, "backgroundColor": "transparent", - "boundElements": null, + "boundElements": [ + { + "id": "id57", + "type": "text", + }, + { + "id": "id61", + "type": "arrow", + }, + ], "customData": undefined, "fillStyle": "solid", "frameId": null, "groupIds": [], "height": 100, - "id": "id54", + "id": "id56", "index": "a0", "isDeleted": false, "link": null, @@ -18050,7 +16249,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding "strokeWidth": 2, "type": "rectangle", "updated": 1, - "version": 2, + "version": 12, "width": 100, "x": -100, "y": -50, @@ -18063,15 +16262,15 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding "autoResize": true, "backgroundColor": "transparent", "boundElements": null, - "containerId": null, + "containerId": "id56", "customData": undefined, "fillStyle": "solid", "fontFamily": 5, "fontSize": 20, "frameId": null, "groupIds": [], - "height": 100, - "id": "id55", + "height": 25, + "id": "id57", "index": "a1", "isDeleted": false, "lineHeight": "1.25000", @@ -18087,14 +16286,14 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding "strokeStyle": "solid", "strokeWidth": 2, "text": "ola", - "textAlign": "left", + "textAlign": "center", "type": "text", "updated": 1, - "version": 2, - "verticalAlign": "top", - "width": 100, - "x": -200, - "y": -200, + "version": 12, + "verticalAlign": "middle", + "width": 30, + "x": -65, + "y": "-12.50000", } `; @@ -18102,13 +16301,18 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding { "angle": 0, "backgroundColor": "transparent", - "boundElements": null, + "boundElements": [ + { + "id": "id61", + "type": "arrow", + }, + ], "customData": undefined, "fillStyle": "solid", "frameId": null, "groupIds": [], "height": 100, - "id": "id56", + "id": "id58", "index": "a2", "isDeleted": false, "link": null, @@ -18123,13 +16327,71 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding "strokeWidth": 2, "type": "rectangle", "updated": 1, - "version": 2, + "version": 9, "width": 100, "x": 100, "y": -50, } `; +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] element 3 1`] = ` +{ + "angle": 0, + "backgroundColor": "transparent", + "boundElements": null, + "customData": undefined, + "elbowed": false, + "endArrowhead": "arrow", + "endBinding": { + "elementId": "id58", + "fixedPoint": null, + "focus": 0, + "gap": 1, + }, + "fillStyle": "solid", + "frameId": null, + "groupIds": [], + "height": 0, + "id": "id61", + "index": "a3", + "isDeleted": false, + "lastCommittedPoint": null, + "link": null, + "locked": false, + "opacity": 100, + "points": [ + [ + 0, + 0, + ], + [ + "98.00000", + 0, + ], + ], + "roughness": 1, + "roundness": { + "type": 2, + }, + "startArrowhead": null, + "startBinding": { + "elementId": "id56", + "fixedPoint": null, + "focus": 0, + "gap": 1, + }, + "strokeColor": "#1e1e1e", + "strokeStyle": "solid", + "strokeWidth": 2, + "type": "arrow", + "updated": 1, + "version": 10, + "width": "98.00000", + "x": 1, + "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] history 1`] = ` History { "onHistoryChangedEmitter": Emitter { @@ -18150,7 +16412,7 @@ History { "elementsChange": ElementsChange { "added": Map {}, "removed": Map { - "id54" => Delta { + "id56" => Delta { "deleted": { "angle": 0, "backgroundColor": "transparent", @@ -18181,7 +16443,7 @@ History { "isDeleted": true, }, }, - "id55" => Delta { + "id57" => Delta { "deleted": { "angle": 0, "autoResize": true, @@ -18221,7 +16483,7 @@ History { "isDeleted": true, }, }, - "id56" => Delta { + "id58" => Delta { "deleted": { "angle": 0, "backgroundColor": "transparent", @@ -18261,7 +16523,7 @@ History { "delta": Delta { "deleted": { "selectedElementIds": { - "id54": true, + "id56": true, }, }, "inserted": { @@ -18280,7 +16542,7 @@ History { "delta": Delta { "deleted": { "selectedElementIds": { - "id55": true, + "id57": true, }, }, "inserted": { @@ -18294,16 +16556,177 @@ History { "updated": Map {}, }, }, - ], -} -`; - -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`] = `3`; - -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`] = `6`; - -exports[`history > singleplayer undo/redo > should support bidirectional bindings > should unbind rectangle from arrow on deletion and rebind on undo > [end of test] appState 1`] = ` -{ + HistoryEntry { + "appStateChange": AppStateChange { + "delta": Delta { + "deleted": { + "selectedElementIds": {}, + }, + "inserted": { + "selectedElementIds": { + "id57": true, + }, + }, + }, + }, + "elementsChange": ElementsChange { + "added": Map {}, + "removed": Map {}, + "updated": Map { + "id56" => Delta { + "deleted": { + "boundElements": [ + { + "id": "id57", + "type": "text", + }, + ], + }, + "inserted": { + "boundElements": [], + }, + }, + "id57" => Delta { + "deleted": { + "containerId": "id56", + "height": 25, + "textAlign": "center", + "verticalAlign": "middle", + "width": 30, + "x": -65, + "y": "-12.50000", + }, + "inserted": { + "containerId": null, + "height": 100, + "textAlign": "left", + "verticalAlign": "top", + "width": 100, + "x": -200, + "y": -200, + }, + }, + }, + }, + }, + HistoryEntry { + "appStateChange": AppStateChange { + "delta": Delta { + "deleted": { + "selectedElementIds": { + "id61": true, + }, + "selectedLinearElementId": "id61", + }, + "inserted": { + "selectedElementIds": { + "id56": true, + }, + "selectedLinearElementId": null, + }, + }, + }, + "elementsChange": ElementsChange { + "added": Map {}, + "removed": Map { + "id61" => Delta { + "deleted": { + "angle": 0, + "backgroundColor": "transparent", + "boundElements": null, + "customData": undefined, + "elbowed": false, + "endArrowhead": "arrow", + "endBinding": { + "elementId": "id58", + "fixedPoint": null, + "focus": 0, + "gap": 1, + }, + "fillStyle": "solid", + "frameId": null, + "groupIds": [], + "height": 0, + "index": "a3", + "isDeleted": false, + "lastCommittedPoint": null, + "link": null, + "locked": false, + "opacity": 100, + "points": [ + [ + 0, + 0, + ], + [ + 100, + 0, + ], + ], + "roughness": 1, + "roundness": { + "type": 2, + }, + "startArrowhead": null, + "startBinding": { + "elementId": "id56", + "fixedPoint": null, + "focus": 0, + "gap": 1, + }, + "strokeColor": "#1e1e1e", + "strokeStyle": "solid", + "strokeWidth": 2, + "type": "arrow", + "width": 100, + "x": 0, + "y": 0, + }, + "inserted": { + "isDeleted": true, + }, + }, + }, + "updated": Map { + "id56" => Delta { + "deleted": { + "boundElements": [ + { + "id": "id61", + "type": "arrow", + }, + ], + }, + "inserted": { + "boundElements": [], + }, + }, + "id58" => Delta { + "deleted": { + "boundElements": [ + { + "id": "id61", + "type": "arrow", + }, + ], + }, + "inserted": { + "boundElements": [], + }, + }, + }, + }, + }, + ], +} +`; + +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`] = `21`; + +exports[`history > singleplayer undo/redo > should support bidirectional bindings > should unbind rectangle from arrow on deletion and rebind on undo > [end of test] appState 1`] = ` +{ "activeEmbeddable": null, "activeTool": { "customType": null, @@ -18312,790 +16735,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding "type": "selection", }, "collaborators": Map {}, - "contextMenu": { - "items": [ - "separator", - { - "icon": , - "keyTest": [Function], - "label": "labels.cut", - "name": "cut", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "icon": , - "keyTest": undefined, - "label": "labels.copy", - "name": "copy", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "keyTest": undefined, - "label": "labels.paste", - "name": "paste", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "label": "labels.selectAllElementsInFrame", - "name": "selectAllElementsInFrame", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "canvas", - }, - }, - { - "label": "labels.removeAllElementsFromFrame", - "name": "removeAllElementsFromFrame", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "history", - }, - }, - "separator", - { - "icon": , - "keyTest": [Function], - "keywords": [ - "png", - "clipboard", - "copy", - ], - "label": "labels.copyAsPng", - "name": "copyAsPng", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "icon": , - "keywords": [ - "svg", - "clipboard", - "copy", - ], - "label": "labels.copyAsSvg", - "name": "copyAsSvg", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "keywords": [ - "text", - "clipboard", - "copy", - ], - "label": "labels.copyText", - "name": "copyText", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", - }, - }, - "separator", - { - "icon": , - "keyTest": [Function], - "label": "labels.copyStyles", - "name": "copyStyles", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "icon": , - "keyTest": [Function], - "label": "labels.pasteStyles", - "name": "pasteStyles", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - "separator", - { - "PanelComponent": [Function], - "icon": [Function], - "keyTest": [Function], - "label": "labels.group", - "name": "group", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "icon": null, - "label": "labels.autoResize", - "name": "autoResize", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "label": "labels.unbindText", - "name": "unbindText", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "label": "labels.bindText", - "name": "bindText", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "label": "labels.createContainerFromText", - "name": "wrapTextInContainer", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "PanelComponent": [Function], - "icon": [Function], - "keyTest": [Function], - "label": "labels.ungroup", - "name": "ungroup", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", - }, - }, - "separator", - { - "label": "labels.addToLibrary", - "name": "addToLibrary", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - "separator", - { - "PanelComponent": [Function], - "icon": , - "keyPriority": 40, - "keyTest": [Function], - "keywords": [ - "move down", - "zindex", - "layer", - ], - "label": "labels.sendBackward", - "name": "sendBackward", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "PanelComponent": [Function], - "icon": , - "keyPriority": 40, - "keyTest": [Function], - "keywords": [ - "move up", - "zindex", - "layer", - ], - "label": "labels.bringForward", - "name": "bringForward", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "PanelComponent": [Function], - "icon": , - "keyTest": [Function], - "keywords": [ - "move down", - "zindex", - "layer", - ], - "label": "labels.sendToBack", - "name": "sendToBack", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "PanelComponent": [Function], - "icon": , - "keyTest": [Function], - "keywords": [ - "move up", - "zindex", - "layer", - ], - "label": "labels.bringToFront", - "name": "bringToFront", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - "separator", - { - "icon": , - "keyTest": [Function], - "label": "labels.flipHorizontal", - "name": "flipHorizontal", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "icon": , - "keyTest": [Function], - "label": "labels.flipVertical", - "name": "flipVertical", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - "separator", - { - "PanelComponent": [Function], - "category": "Elements", - "keywords": [ - "line", - ], - "label": [Function], - "name": "toggleLinearEditor", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "PanelComponent": [Function], - "icon": , - "keyTest": [Function], - "label": [Function], - "name": "hyperlink", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "action": "click", - "category": "hyperlink", - }, - }, - { - "PanelComponent": [Function], - "icon": , - "keyTest": [Function], - "label": "labels.duplicateSelection", - "name": "duplicateSelection", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "icon": [Function], - "keyTest": [Function], - "label": [Function], - "name": "toggleElementLock", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", - }, - }, - "separator", - { - "PanelComponent": [Function], - "icon": , - "keyTest": [Function], - "label": "labels.delete", - "name": "deleteSelectedElements", - "perform": [Function], - "trackEvent": { - "action": "delete", - "category": "element", - }, - }, - ], - "left": 0, - "top": 0, - }, + "contextMenu": null, "currentChartType": "bar", "currentHoveredFontFamily": null, "currentItemArrowType": "round", @@ -19161,15 +16801,12 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding "penDetected": false, "penMode": false, "pendingImageElementId": null, - "previousSelectedElementIds": { - "id59": true, - }, + "previousSelectedElementIds": {}, "resizingElement": null, "scrollX": 0, "scrollY": 0, "selectedElementIds": { - "id59": true, - "id60": true, + "id62": true, }, "selectedElementsAreBeingDragged": false, "selectedGroupIds": {}, @@ -19201,13 +16838,22 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding { "angle": 0, "backgroundColor": "transparent", - "boundElements": null, + "boundElements": [ + { + "id": "id67", + "type": "arrow", + }, + { + "id": "id63", + "type": "text", + }, + ], "customData": undefined, "fillStyle": "solid", "frameId": null, "groupIds": [], "height": 100, - "id": "id59", + "id": "id62", "index": "a0", "isDeleted": false, "link": null, @@ -19222,7 +16868,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding "strokeWidth": 2, "type": "rectangle", "updated": 1, - "version": 2, + "version": 8, "width": 100, "x": -100, "y": -50, @@ -19235,15 +16881,15 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding "autoResize": true, "backgroundColor": "transparent", "boundElements": null, - "containerId": null, + "containerId": "id62", "customData": undefined, "fillStyle": "solid", "fontFamily": 5, "fontSize": 20, "frameId": null, "groupIds": [], - "height": 100, - "id": "id60", + "height": 25, + "id": "id63", "index": "a1", "isDeleted": false, "lineHeight": "1.25000", @@ -19259,14 +16905,14 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding "strokeStyle": "solid", "strokeWidth": 2, "text": "ola", - "textAlign": "left", + "textAlign": "center", "type": "text", "updated": 1, - "version": 2, - "verticalAlign": "top", - "width": 100, - "x": -200, - "y": -200, + "version": 8, + "verticalAlign": "middle", + "width": 30, + "x": -65, + "y": "-12.50000", } `; @@ -19274,13 +16920,18 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding { "angle": 0, "backgroundColor": "transparent", - "boundElements": null, + "boundElements": [ + { + "id": "id67", + "type": "arrow", + }, + ], "customData": undefined, "fillStyle": "solid", "frameId": null, "groupIds": [], "height": 100, - "id": "id61", + "id": "id64", "index": "a2", "isDeleted": false, "link": null, @@ -19295,13 +16946,71 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding "strokeWidth": 2, "type": "rectangle", "updated": 1, - "version": 2, + "version": 5, "width": 100, "x": 100, "y": -50, } `; +exports[`history > singleplayer undo/redo > should support bidirectional bindings > should unbind rectangle from arrow on deletion and rebind on undo > [end of test] element 3 1`] = ` +{ + "angle": 0, + "backgroundColor": "transparent", + "boundElements": null, + "customData": undefined, + "elbowed": false, + "endArrowhead": "arrow", + "endBinding": { + "elementId": "id64", + "fixedPoint": null, + "focus": 0, + "gap": 1, + }, + "fillStyle": "solid", + "frameId": null, + "groupIds": [], + "height": 0, + "id": "id67", + "index": "a3", + "isDeleted": false, + "lastCommittedPoint": null, + "link": null, + "locked": false, + "opacity": 100, + "points": [ + [ + 0, + 0, + ], + [ + "98.00000", + 0, + ], + ], + "roughness": 1, + "roundness": { + "type": 2, + }, + "startArrowhead": null, + "startBinding": { + "elementId": "id62", + "fixedPoint": null, + "focus": 0, + "gap": 1, + }, + "strokeColor": "#1e1e1e", + "strokeStyle": "solid", + "strokeWidth": 2, + "type": "arrow", + "updated": 1, + "version": 10, + "width": "98.00000", + "x": 1, + "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] history 1`] = ` History { "onHistoryChangedEmitter": Emitter { @@ -19310,20 +17019,91 @@ History { [Function], ], }, - "redoStack": [], - "undoStack": [ + "redoStack": [ HistoryEntry { "appStateChange": AppStateChange { "delta": Delta { - "deleted": {}, - "inserted": {}, - }, - }, - "elementsChange": ElementsChange { - "added": Map {}, - "removed": Map { - "id59" => Delta { - "deleted": { + "deleted": { + "selectedElementIds": { + "id62": true, + }, + }, + "inserted": { + "selectedElementIds": {}, + }, + }, + }, + "elementsChange": ElementsChange { + "added": Map {}, + "removed": Map { + "id62" => Delta { + "deleted": { + "isDeleted": false, + }, + "inserted": { + "isDeleted": true, + }, + }, + "id63" => Delta { + "deleted": { + "isDeleted": false, + }, + "inserted": { + "isDeleted": true, + }, + }, + }, + "updated": Map { + "id67" => Delta { + "deleted": { + "points": [ + [ + 0, + 0, + ], + [ + 100, + 0, + ], + ], + "startBinding": { + "elementId": "id62", + "fixedPoint": null, + "focus": 0, + "gap": 1, + }, + }, + "inserted": { + "points": [ + [ + 0, + 0, + ], + [ + 100, + 0, + ], + ], + "startBinding": null, + }, + }, + }, + }, + }, + ], + "undoStack": [ + HistoryEntry { + "appStateChange": AppStateChange { + "delta": Delta { + "deleted": {}, + "inserted": {}, + }, + }, + "elementsChange": ElementsChange { + "added": Map {}, + "removed": Map { + "id62" => Delta { + "deleted": { "angle": 0, "backgroundColor": "transparent", "boundElements": null, @@ -19353,7 +17133,7 @@ History { "isDeleted": true, }, }, - "id60" => Delta { + "id63" => Delta { "deleted": { "angle": 0, "autoResize": true, @@ -19393,7 +17173,7 @@ History { "isDeleted": true, }, }, - "id61" => Delta { + "id64" => Delta { "deleted": { "angle": 0, "backgroundColor": "transparent", @@ -19433,7 +17213,7 @@ History { "delta": Delta { "deleted": { "selectedElementIds": { - "id59": true, + "id62": true, }, }, "inserted": { @@ -19452,7 +17232,7 @@ History { "delta": Delta { "deleted": { "selectedElementIds": { - "id60": true, + "id63": true, }, }, "inserted": { @@ -19466,13 +17246,197 @@ History { "updated": Map {}, }, }, + HistoryEntry { + "appStateChange": AppStateChange { + "delta": Delta { + "deleted": { + "selectedElementIds": {}, + }, + "inserted": { + "selectedElementIds": { + "id63": true, + }, + }, + }, + }, + "elementsChange": ElementsChange { + "added": Map {}, + "removed": Map {}, + "updated": Map { + "id62" => Delta { + "deleted": { + "boundElements": [ + { + "id": "id63", + "type": "text", + }, + ], + }, + "inserted": { + "boundElements": [], + }, + }, + "id63" => Delta { + "deleted": { + "containerId": "id62", + "height": 25, + "textAlign": "center", + "verticalAlign": "middle", + "width": 30, + "x": -65, + "y": "-12.50000", + }, + "inserted": { + "containerId": null, + "height": 100, + "textAlign": "left", + "verticalAlign": "top", + "width": 100, + "x": -200, + "y": -200, + }, + }, + }, + }, + }, + HistoryEntry { + "appStateChange": AppStateChange { + "delta": Delta { + "deleted": { + "selectedElementIds": { + "id67": true, + }, + "selectedLinearElementId": "id67", + }, + "inserted": { + "selectedElementIds": { + "id62": true, + }, + "selectedLinearElementId": null, + }, + }, + }, + "elementsChange": ElementsChange { + "added": Map {}, + "removed": Map { + "id67" => Delta { + "deleted": { + "angle": 0, + "backgroundColor": "transparent", + "boundElements": null, + "customData": undefined, + "elbowed": false, + "endArrowhead": "arrow", + "endBinding": { + "elementId": "id64", + "fixedPoint": null, + "focus": 0, + "gap": 1, + }, + "fillStyle": "solid", + "frameId": null, + "groupIds": [], + "height": 0, + "index": "a3", + "isDeleted": false, + "lastCommittedPoint": null, + "link": null, + "locked": false, + "opacity": 100, + "points": [ + [ + 0, + 0, + ], + [ + 100, + 0, + ], + ], + "roughness": 1, + "roundness": { + "type": 2, + }, + "startArrowhead": null, + "startBinding": { + "elementId": "id62", + "fixedPoint": null, + "focus": 0, + "gap": 1, + }, + "strokeColor": "#1e1e1e", + "strokeStyle": "solid", + "strokeWidth": 2, + "type": "arrow", + "width": 100, + "x": 0, + "y": 0, + }, + "inserted": { + "isDeleted": true, + }, + }, + }, + "updated": Map { + "id62" => Delta { + "deleted": { + "boundElements": [ + { + "id": "id67", + "type": "arrow", + }, + ], + }, + "inserted": { + "boundElements": [], + }, + }, + "id64" => Delta { + "deleted": { + "boundElements": [ + { + "id": "id67", + "type": "arrow", + }, + ], + }, + "inserted": { + "boundElements": [], + }, + }, + }, + }, + }, + HistoryEntry { + "appStateChange": AppStateChange { + "delta": Delta { + "deleted": { + "selectedElementIds": { + "id62": true, + }, + "selectedLinearElementId": null, + }, + "inserted": { + "selectedElementIds": { + "id67": true, + }, + "selectedLinearElementId": "id67", + }, + }, + }, + "elementsChange": ElementsChange { + "added": Map {}, + "removed": Map {}, + "updated": Map {}, + }, + }, ], } `; -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`] = `3`; +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`] = `6`; +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`] = `15`; exports[`history > singleplayer undo/redo > should support bidirectional bindings > should unbind rectangles from arrow on deletion and rebind on undo > [end of test] appState 1`] = ` { @@ -19484,790 +17448,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding "type": "selection", }, "collaborators": Map {}, - "contextMenu": { - "items": [ - "separator", - { - "icon": , - "keyTest": [Function], - "label": "labels.cut", - "name": "cut", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "icon": , - "keyTest": undefined, - "label": "labels.copy", - "name": "copy", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "keyTest": undefined, - "label": "labels.paste", - "name": "paste", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "label": "labels.selectAllElementsInFrame", - "name": "selectAllElementsInFrame", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "canvas", - }, - }, - { - "label": "labels.removeAllElementsFromFrame", - "name": "removeAllElementsFromFrame", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "history", - }, - }, - "separator", - { - "icon": , - "keyTest": [Function], - "keywords": [ - "png", - "clipboard", - "copy", - ], - "label": "labels.copyAsPng", - "name": "copyAsPng", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "icon": , - "keywords": [ - "svg", - "clipboard", - "copy", - ], - "label": "labels.copyAsSvg", - "name": "copyAsSvg", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "keywords": [ - "text", - "clipboard", - "copy", - ], - "label": "labels.copyText", - "name": "copyText", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", - }, - }, - "separator", - { - "icon": , - "keyTest": [Function], - "label": "labels.copyStyles", - "name": "copyStyles", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "icon": , - "keyTest": [Function], - "label": "labels.pasteStyles", - "name": "pasteStyles", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - "separator", - { - "PanelComponent": [Function], - "icon": [Function], - "keyTest": [Function], - "label": "labels.group", - "name": "group", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "icon": null, - "label": "labels.autoResize", - "name": "autoResize", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "label": "labels.unbindText", - "name": "unbindText", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "label": "labels.bindText", - "name": "bindText", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "label": "labels.createContainerFromText", - "name": "wrapTextInContainer", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "PanelComponent": [Function], - "icon": [Function], - "keyTest": [Function], - "label": "labels.ungroup", - "name": "ungroup", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", - }, - }, - "separator", - { - "label": "labels.addToLibrary", - "name": "addToLibrary", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - "separator", - { - "PanelComponent": [Function], - "icon": , - "keyPriority": 40, - "keyTest": [Function], - "keywords": [ - "move down", - "zindex", - "layer", - ], - "label": "labels.sendBackward", - "name": "sendBackward", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "PanelComponent": [Function], - "icon": , - "keyPriority": 40, - "keyTest": [Function], - "keywords": [ - "move up", - "zindex", - "layer", - ], - "label": "labels.bringForward", - "name": "bringForward", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "PanelComponent": [Function], - "icon": , - "keyTest": [Function], - "keywords": [ - "move down", - "zindex", - "layer", - ], - "label": "labels.sendToBack", - "name": "sendToBack", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "PanelComponent": [Function], - "icon": , - "keyTest": [Function], - "keywords": [ - "move up", - "zindex", - "layer", - ], - "label": "labels.bringToFront", - "name": "bringToFront", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - "separator", - { - "icon": , - "keyTest": [Function], - "label": "labels.flipHorizontal", - "name": "flipHorizontal", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "icon": , - "keyTest": [Function], - "label": "labels.flipVertical", - "name": "flipVertical", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - "separator", - { - "PanelComponent": [Function], - "category": "Elements", - "keywords": [ - "line", - ], - "label": [Function], - "name": "toggleLinearEditor", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "PanelComponent": [Function], - "icon": , - "keyTest": [Function], - "label": [Function], - "name": "hyperlink", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "action": "click", - "category": "hyperlink", - }, - }, - { - "PanelComponent": [Function], - "icon": , - "keyTest": [Function], - "label": "labels.duplicateSelection", - "name": "duplicateSelection", - "perform": [Function], - "trackEvent": { - "category": "element", - }, - }, - { - "icon": [Function], - "keyTest": [Function], - "label": [Function], - "name": "toggleElementLock", - "perform": [Function], - "predicate": [Function], - "trackEvent": { - "category": "element", - }, - }, - "separator", - { - "PanelComponent": [Function], - "icon": , - "keyTest": [Function], - "label": "labels.delete", - "name": "deleteSelectedElements", - "perform": [Function], - "trackEvent": { - "action": "delete", - "category": "element", - }, - }, - ], - "left": 0, - "top": 0, - }, + "contextMenu": null, "currentChartType": "bar", "currentHoveredFontFamily": null, "currentItemArrowType": "round", @@ -20334,14 +17515,14 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding "penMode": false, "pendingImageElementId": null, "previousSelectedElementIds": { - "id64": true, + "id69": true, }, "resizingElement": null, "scrollX": 0, "scrollY": 0, "selectedElementIds": { - "id64": true, - "id65": true, + "id69": true, + "id71": true, }, "selectedElementsAreBeingDragged": false, "selectedGroupIds": {}, @@ -20373,13 +17554,22 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding { "angle": 0, "backgroundColor": "transparent", - "boundElements": null, + "boundElements": [ + { + "id": "id74", + "type": "arrow", + }, + { + "id": "id70", + "type": "text", + }, + ], "customData": undefined, "fillStyle": "solid", "frameId": null, "groupIds": [], "height": 100, - "id": "id64", + "id": "id69", "index": "a0", "isDeleted": false, "link": null, @@ -20394,7 +17584,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding "strokeWidth": 2, "type": "rectangle", "updated": 1, - "version": 2, + "version": 8, "width": 100, "x": -100, "y": -50, @@ -20407,15 +17597,15 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding "autoResize": true, "backgroundColor": "transparent", "boundElements": null, - "containerId": null, + "containerId": "id69", "customData": undefined, "fillStyle": "solid", "fontFamily": 5, "fontSize": 20, "frameId": null, "groupIds": [], - "height": 100, - "id": "id65", + "height": 25, + "id": "id70", "index": "a1", "isDeleted": false, "lineHeight": "1.25000", @@ -20431,14 +17621,14 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding "strokeStyle": "solid", "strokeWidth": 2, "text": "ola", - "textAlign": "left", + "textAlign": "center", "type": "text", "updated": 1, - "version": 2, - "verticalAlign": "top", - "width": 100, - "x": -200, - "y": -200, + "version": 8, + "verticalAlign": "middle", + "width": 30, + "x": -65, + "y": "-12.50000", } `; @@ -20446,13 +17636,18 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding { "angle": 0, "backgroundColor": "transparent", - "boundElements": null, + "boundElements": [ + { + "id": "id74", + "type": "arrow", + }, + ], "customData": undefined, "fillStyle": "solid", "frameId": null, "groupIds": [], "height": 100, - "id": "id66", + "id": "id71", "index": "a2", "isDeleted": false, "link": null, @@ -20467,13 +17662,71 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding "strokeWidth": 2, "type": "rectangle", "updated": 1, - "version": 2, + "version": 5, "width": 100, "x": 100, "y": -50, } `; +exports[`history > singleplayer undo/redo > should support bidirectional bindings > should unbind rectangles from arrow on deletion and rebind on undo > [end of test] element 3 1`] = ` +{ + "angle": 0, + "backgroundColor": "transparent", + "boundElements": null, + "customData": undefined, + "elbowed": false, + "endArrowhead": "arrow", + "endBinding": { + "elementId": "id71", + "fixedPoint": null, + "focus": 0, + "gap": 1, + }, + "fillStyle": "solid", + "frameId": null, + "groupIds": [], + "height": 0, + "id": "id74", + "index": "a3", + "isDeleted": false, + "lastCommittedPoint": null, + "link": null, + "locked": false, + "opacity": 100, + "points": [ + [ + 0, + 0, + ], + [ + "98.00000", + 0, + ], + ], + "roughness": 1, + "roundness": { + "type": 2, + }, + "startArrowhead": null, + "startBinding": { + "elementId": "id69", + "fixedPoint": null, + "focus": 0, + "gap": 1, + }, + "strokeColor": "#1e1e1e", + "strokeStyle": "solid", + "strokeWidth": 2, + "type": "arrow", + "updated": 1, + "version": 11, + "width": "98.00000", + "x": 1, + "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] history 1`] = ` History { "onHistoryChangedEmitter": Emitter { @@ -20482,7 +17735,94 @@ History { [Function], ], }, - "redoStack": [], + "redoStack": [ + HistoryEntry { + "appStateChange": AppStateChange { + "delta": Delta { + "deleted": { + "selectedElementIds": { + "id69": true, + "id71": true, + }, + }, + "inserted": { + "selectedElementIds": {}, + }, + }, + }, + "elementsChange": ElementsChange { + "added": Map {}, + "removed": Map { + "id69" => Delta { + "deleted": { + "isDeleted": false, + }, + "inserted": { + "isDeleted": true, + }, + }, + "id70" => Delta { + "deleted": { + "isDeleted": false, + }, + "inserted": { + "isDeleted": true, + }, + }, + "id71" => Delta { + "deleted": { + "isDeleted": false, + }, + "inserted": { + "isDeleted": true, + }, + }, + }, + "updated": Map { + "id74" => Delta { + "deleted": { + "endBinding": { + "elementId": "id71", + "fixedPoint": null, + "focus": 0, + "gap": 1, + }, + "points": [ + [ + 0, + 0, + ], + [ + 100, + 0, + ], + ], + "startBinding": { + "elementId": "id69", + "fixedPoint": null, + "focus": 0, + "gap": 1, + }, + }, + "inserted": { + "endBinding": null, + "points": [ + [ + 0, + 0, + ], + [ + 100, + 0, + ], + ], + "startBinding": null, + }, + }, + }, + }, + }, + ], "undoStack": [ HistoryEntry { "appStateChange": AppStateChange { @@ -20494,7 +17834,7 @@ History { "elementsChange": ElementsChange { "added": Map {}, "removed": Map { - "id64" => Delta { + "id69" => Delta { "deleted": { "angle": 0, "backgroundColor": "transparent", @@ -20525,7 +17865,7 @@ History { "isDeleted": true, }, }, - "id65" => Delta { + "id70" => Delta { "deleted": { "angle": 0, "autoResize": true, @@ -20565,7 +17905,7 @@ History { "isDeleted": true, }, }, - "id66" => Delta { + "id71" => Delta { "deleted": { "angle": 0, "backgroundColor": "transparent", @@ -20605,7 +17945,7 @@ History { "delta": Delta { "deleted": { "selectedElementIds": { - "id64": true, + "id69": true, }, }, "inserted": { @@ -20624,7 +17964,210 @@ History { "delta": Delta { "deleted": { "selectedElementIds": { - "id65": true, + "id70": true, + }, + }, + "inserted": { + "selectedElementIds": {}, + }, + }, + }, + "elementsChange": ElementsChange { + "added": Map {}, + "removed": Map {}, + "updated": Map {}, + }, + }, + HistoryEntry { + "appStateChange": AppStateChange { + "delta": Delta { + "deleted": { + "selectedElementIds": {}, + }, + "inserted": { + "selectedElementIds": { + "id70": true, + }, + }, + }, + }, + "elementsChange": ElementsChange { + "added": Map {}, + "removed": Map {}, + "updated": Map { + "id69" => Delta { + "deleted": { + "boundElements": [ + { + "id": "id70", + "type": "text", + }, + ], + }, + "inserted": { + "boundElements": [], + }, + }, + "id70" => Delta { + "deleted": { + "containerId": "id69", + "height": 25, + "textAlign": "center", + "verticalAlign": "middle", + "width": 30, + "x": -65, + "y": "-12.50000", + }, + "inserted": { + "containerId": null, + "height": 100, + "textAlign": "left", + "verticalAlign": "top", + "width": 100, + "x": -200, + "y": -200, + }, + }, + }, + }, + }, + HistoryEntry { + "appStateChange": AppStateChange { + "delta": Delta { + "deleted": { + "selectedElementIds": { + "id74": true, + }, + "selectedLinearElementId": "id74", + }, + "inserted": { + "selectedElementIds": { + "id69": true, + }, + "selectedLinearElementId": null, + }, + }, + }, + "elementsChange": ElementsChange { + "added": Map {}, + "removed": Map { + "id74" => Delta { + "deleted": { + "angle": 0, + "backgroundColor": "transparent", + "boundElements": null, + "customData": undefined, + "elbowed": false, + "endArrowhead": "arrow", + "endBinding": { + "elementId": "id71", + "fixedPoint": null, + "focus": 0, + "gap": 1, + }, + "fillStyle": "solid", + "frameId": null, + "groupIds": [], + "height": 0, + "index": "a3", + "isDeleted": false, + "lastCommittedPoint": null, + "link": null, + "locked": false, + "opacity": 100, + "points": [ + [ + 0, + 0, + ], + [ + 100, + 0, + ], + ], + "roughness": 1, + "roundness": { + "type": 2, + }, + "startArrowhead": null, + "startBinding": { + "elementId": "id69", + "fixedPoint": null, + "focus": 0, + "gap": 1, + }, + "strokeColor": "#1e1e1e", + "strokeStyle": "solid", + "strokeWidth": 2, + "type": "arrow", + "width": 100, + "x": 0, + "y": 0, + }, + "inserted": { + "isDeleted": true, + }, + }, + }, + "updated": Map { + "id69" => Delta { + "deleted": { + "boundElements": [ + { + "id": "id74", + "type": "arrow", + }, + ], + }, + "inserted": { + "boundElements": [], + }, + }, + "id71" => Delta { + "deleted": { + "boundElements": [ + { + "id": "id74", + "type": "arrow", + }, + ], + }, + "inserted": { + "boundElements": [], + }, + }, + }, + }, + }, + HistoryEntry { + "appStateChange": AppStateChange { + "delta": Delta { + "deleted": { + "selectedElementIds": { + "id69": true, + }, + "selectedLinearElementId": null, + }, + "inserted": { + "selectedElementIds": { + "id74": true, + }, + "selectedLinearElementId": "id74", + }, + }, + }, + "elementsChange": ElementsChange { + "added": Map {}, + "removed": Map {}, + "updated": Map {}, + }, + }, + HistoryEntry { + "appStateChange": AppStateChange { + "delta": Delta { + "deleted": { + "selectedElementIds": { + "id71": true, }, }, "inserted": { @@ -20642,9 +18185,9 @@ History { } `; -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`] = `3`; +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`] = `6`; +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`] = `16`; exports[`history > singleplayer undo/redo > should support changes in elements' order > [end of test] appState 1`] = ` {