|
@@ -12496,9217 +12496,6 @@ exports[`regression tests rerenders UI on language change: [end of test] number
|
|
|
|
|
|
exports[`regression tests rerenders UI on language change: [end of test] number of renders 1`] = `4`;
|
|
|
|
|
|
-exports[`regression tests resize an element, trying every resize handle: [end of test] appState 1`] = `
|
|
|
-Object {
|
|
|
- "appearance": "light",
|
|
|
- "collaborators": Map {},
|
|
|
- "currentItemBackgroundColor": "transparent",
|
|
|
- "currentItemFillStyle": "hachure",
|
|
|
- "currentItemFontFamily": 1,
|
|
|
- "currentItemFontSize": 20,
|
|
|
- "currentItemLinearStrokeSharpness": "round",
|
|
|
- "currentItemOpacity": 100,
|
|
|
- "currentItemRoughness": 1,
|
|
|
- "currentItemStrokeColor": "#000000",
|
|
|
- "currentItemStrokeSharpness": "sharp",
|
|
|
- "currentItemStrokeStyle": "solid",
|
|
|
- "currentItemStrokeWidth": 1,
|
|
|
- "currentItemTextAlign": "left",
|
|
|
- "cursorButton": "up",
|
|
|
- "cursorX": 0,
|
|
|
- "cursorY": 0,
|
|
|
- "draggingElement": null,
|
|
|
- "editingElement": null,
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "elementLocked": false,
|
|
|
- "elementType": "selection",
|
|
|
- "errorMessage": null,
|
|
|
- "exportBackground": true,
|
|
|
- "exportEmbedScene": false,
|
|
|
- "fileHandle": null,
|
|
|
- "gridSize": null,
|
|
|
- "height": 768,
|
|
|
- "isBindingEnabled": true,
|
|
|
- "isLibraryOpen": false,
|
|
|
- "isLoading": false,
|
|
|
- "isResizing": false,
|
|
|
- "isRotating": false,
|
|
|
- "lastPointerDownWith": "mouse",
|
|
|
- "multiElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "offsetLeft": 0,
|
|
|
- "offsetTop": 0,
|
|
|
- "openMenu": null,
|
|
|
- "previousSelectedElementIds": Object {},
|
|
|
- "resizingElement": null,
|
|
|
- "scrollX": 0,
|
|
|
- "scrollY": 0,
|
|
|
- "scrolledOutside": false,
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id10": true,
|
|
|
- "id11": true,
|
|
|
- "id12": true,
|
|
|
- "id13": true,
|
|
|
- "id14": true,
|
|
|
- "id15": true,
|
|
|
- "id16": true,
|
|
|
- "id2": true,
|
|
|
- "id3": true,
|
|
|
- "id4": true,
|
|
|
- "id5": true,
|
|
|
- "id6": true,
|
|
|
- "id7": true,
|
|
|
- "id8": true,
|
|
|
- "id9": true,
|
|
|
- },
|
|
|
- "selectedGroupIds": Object {},
|
|
|
- "selectionElement": null,
|
|
|
- "shouldAddWatermark": false,
|
|
|
- "shouldCacheIgnoreZoom": false,
|
|
|
- "showShortcutsDialog": false,
|
|
|
- "startBoundElement": null,
|
|
|
- "suggestedBindings": Array [],
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- "width": 1024,
|
|
|
- "zenModeEnabled": false,
|
|
|
- "zoom": Object {
|
|
|
- "translation": Object {
|
|
|
- "x": 0,
|
|
|
- "y": 0,
|
|
|
- },
|
|
|
- "value": 1,
|
|
|
- },
|
|
|
-}
|
|
|
-`;
|
|
|
-
|
|
|
-exports[`regression tests resize an element, trying every resize handle: [end of test] element 0 1`] = `
|
|
|
-Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 10,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 18,
|
|
|
- "versionNonce": 845789479,
|
|
|
- "width": 10,
|
|
|
- "x": 10,
|
|
|
- "y": 10,
|
|
|
-}
|
|
|
-`;
|
|
|
-
|
|
|
-exports[`regression tests resize an element, trying every resize handle: [end of test] history 1`] = `
|
|
|
-Object {
|
|
|
- "recording": false,
|
|
|
- "redoStack": Array [],
|
|
|
- "stateHistory": Array [
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {},
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 10,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 2,
|
|
|
- "versionNonce": 1278240551,
|
|
|
- "width": 10,
|
|
|
- "x": 10,
|
|
|
- "y": 10,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 15,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 3,
|
|
|
- "versionNonce": 453191,
|
|
|
- "width": 15,
|
|
|
- "x": 5,
|
|
|
- "y": 5,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id2": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 10,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 4,
|
|
|
- "versionNonce": 2019559783,
|
|
|
- "width": 10,
|
|
|
- "x": 10,
|
|
|
- "y": 10,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id2": true,
|
|
|
- "id3": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 5,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 5,
|
|
|
- "versionNonce": 1116226695,
|
|
|
- "width": 5,
|
|
|
- "x": 15,
|
|
|
- "y": 15,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id2": true,
|
|
|
- "id3": true,
|
|
|
- "id4": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 10,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 6,
|
|
|
- "versionNonce": 238820263,
|
|
|
- "width": 10,
|
|
|
- "x": 10,
|
|
|
- "y": 10,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id2": true,
|
|
|
- "id3": true,
|
|
|
- "id4": true,
|
|
|
- "id5": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 15,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 7,
|
|
|
- "versionNonce": 1604849351,
|
|
|
- "width": 5,
|
|
|
- "x": 10,
|
|
|
- "y": 5,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id2": true,
|
|
|
- "id3": true,
|
|
|
- "id4": true,
|
|
|
- "id5": true,
|
|
|
- "id6": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 10,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 8,
|
|
|
- "versionNonce": 23633383,
|
|
|
- "width": 10,
|
|
|
- "x": 10,
|
|
|
- "y": 10,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id2": true,
|
|
|
- "id3": true,
|
|
|
- "id4": true,
|
|
|
- "id5": true,
|
|
|
- "id6": true,
|
|
|
- "id7": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 5,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 9,
|
|
|
- "versionNonce": 915032327,
|
|
|
- "width": 15,
|
|
|
- "x": 10,
|
|
|
- "y": 15,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id2": true,
|
|
|
- "id3": true,
|
|
|
- "id4": true,
|
|
|
- "id5": true,
|
|
|
- "id6": true,
|
|
|
- "id7": true,
|
|
|
- "id8": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 10,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 10,
|
|
|
- "versionNonce": 747212839,
|
|
|
- "width": 10,
|
|
|
- "x": 10,
|
|
|
- "y": 10,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id2": true,
|
|
|
- "id3": true,
|
|
|
- "id4": true,
|
|
|
- "id5": true,
|
|
|
- "id6": true,
|
|
|
- "id7": true,
|
|
|
- "id8": true,
|
|
|
- "id9": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 5,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 11,
|
|
|
- "versionNonce": 760410951,
|
|
|
- "width": 15,
|
|
|
- "x": 5,
|
|
|
- "y": 10,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id10": true,
|
|
|
- "id2": true,
|
|
|
- "id3": true,
|
|
|
- "id4": true,
|
|
|
- "id5": true,
|
|
|
- "id6": true,
|
|
|
- "id7": true,
|
|
|
- "id8": true,
|
|
|
- "id9": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 10,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 12,
|
|
|
- "versionNonce": 289600103,
|
|
|
- "width": 10,
|
|
|
- "x": 10,
|
|
|
- "y": 10,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id10": true,
|
|
|
- "id11": true,
|
|
|
- "id2": true,
|
|
|
- "id3": true,
|
|
|
- "id4": true,
|
|
|
- "id5": true,
|
|
|
- "id6": true,
|
|
|
- "id7": true,
|
|
|
- "id8": true,
|
|
|
- "id9": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 15,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 13,
|
|
|
- "versionNonce": 1898319239,
|
|
|
- "width": 5,
|
|
|
- "x": 15,
|
|
|
- "y": 10,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id10": true,
|
|
|
- "id11": true,
|
|
|
- "id12": true,
|
|
|
- "id2": true,
|
|
|
- "id3": true,
|
|
|
- "id4": true,
|
|
|
- "id5": true,
|
|
|
- "id6": true,
|
|
|
- "id7": true,
|
|
|
- "id8": true,
|
|
|
- "id9": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 10,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 14,
|
|
|
- "versionNonce": 406373543,
|
|
|
- "width": 10,
|
|
|
- "x": 10,
|
|
|
- "y": 10,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id10": true,
|
|
|
- "id11": true,
|
|
|
- "id12": true,
|
|
|
- "id13": true,
|
|
|
- "id2": true,
|
|
|
- "id3": true,
|
|
|
- "id4": true,
|
|
|
- "id5": true,
|
|
|
- "id6": true,
|
|
|
- "id7": true,
|
|
|
- "id8": true,
|
|
|
- "id9": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 5,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 15,
|
|
|
- "versionNonce": 908564423,
|
|
|
- "width": 5,
|
|
|
- "x": 10,
|
|
|
- "y": 10,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id10": true,
|
|
|
- "id11": true,
|
|
|
- "id12": true,
|
|
|
- "id13": true,
|
|
|
- "id14": true,
|
|
|
- "id2": true,
|
|
|
- "id3": true,
|
|
|
- "id4": true,
|
|
|
- "id5": true,
|
|
|
- "id6": true,
|
|
|
- "id7": true,
|
|
|
- "id8": true,
|
|
|
- "id9": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 10,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 16,
|
|
|
- "versionNonce": 1359939303,
|
|
|
- "width": 10,
|
|
|
- "x": 10,
|
|
|
- "y": 10,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id10": true,
|
|
|
- "id11": true,
|
|
|
- "id12": true,
|
|
|
- "id13": true,
|
|
|
- "id14": true,
|
|
|
- "id15": true,
|
|
|
- "id2": true,
|
|
|
- "id3": true,
|
|
|
- "id4": true,
|
|
|
- "id5": true,
|
|
|
- "id6": true,
|
|
|
- "id7": true,
|
|
|
- "id8": true,
|
|
|
- "id9": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 15,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 17,
|
|
|
- "versionNonce": 2004587015,
|
|
|
- "width": 15,
|
|
|
- "x": 10,
|
|
|
- "y": 10,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id10": true,
|
|
|
- "id11": true,
|
|
|
- "id12": true,
|
|
|
- "id13": true,
|
|
|
- "id14": true,
|
|
|
- "id15": true,
|
|
|
- "id16": true,
|
|
|
- "id2": true,
|
|
|
- "id3": true,
|
|
|
- "id4": true,
|
|
|
- "id5": true,
|
|
|
- "id6": true,
|
|
|
- "id7": true,
|
|
|
- "id8": true,
|
|
|
- "id9": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 10,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 18,
|
|
|
- "versionNonce": 845789479,
|
|
|
- "width": 10,
|
|
|
- "x": 10,
|
|
|
- "y": 10,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- ],
|
|
|
-}
|
|
|
-`;
|
|
|
-
|
|
|
-exports[`regression tests resize an element, trying every resize handle: [end of test] number of elements 1`] = `1`;
|
|
|
-
|
|
|
-exports[`regression tests resize an element, trying every resize handle: [end of test] number of renders 1`] = `53`;
|
|
|
-
|
|
|
-exports[`regression tests resize an element, trying every resize handle: [resize handle ne (+5, +5)] appState 1`] = `
|
|
|
-Object {
|
|
|
- "appearance": "light",
|
|
|
- "collaborators": Map {},
|
|
|
- "currentItemBackgroundColor": "transparent",
|
|
|
- "currentItemFillStyle": "hachure",
|
|
|
- "currentItemFontFamily": 1,
|
|
|
- "currentItemFontSize": 20,
|
|
|
- "currentItemLinearStrokeSharpness": "round",
|
|
|
- "currentItemOpacity": 100,
|
|
|
- "currentItemRoughness": 1,
|
|
|
- "currentItemStrokeColor": "#000000",
|
|
|
- "currentItemStrokeSharpness": "sharp",
|
|
|
- "currentItemStrokeStyle": "solid",
|
|
|
- "currentItemStrokeWidth": 1,
|
|
|
- "currentItemTextAlign": "left",
|
|
|
- "cursorButton": "up",
|
|
|
- "cursorX": 0,
|
|
|
- "cursorY": 0,
|
|
|
- "draggingElement": null,
|
|
|
- "editingElement": null,
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "elementLocked": false,
|
|
|
- "elementType": "selection",
|
|
|
- "errorMessage": null,
|
|
|
- "exportBackground": true,
|
|
|
- "exportEmbedScene": false,
|
|
|
- "fileHandle": null,
|
|
|
- "gridSize": null,
|
|
|
- "height": 768,
|
|
|
- "isBindingEnabled": true,
|
|
|
- "isLibraryOpen": false,
|
|
|
- "isLoading": false,
|
|
|
- "isResizing": false,
|
|
|
- "isRotating": false,
|
|
|
- "lastPointerDownWith": "mouse",
|
|
|
- "multiElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "offsetLeft": 0,
|
|
|
- "offsetTop": 0,
|
|
|
- "openMenu": null,
|
|
|
- "previousSelectedElementIds": Object {},
|
|
|
- "resizingElement": null,
|
|
|
- "scrollX": 0,
|
|
|
- "scrollY": 0,
|
|
|
- "scrolledOutside": false,
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id2": true,
|
|
|
- "id3": true,
|
|
|
- "id4": true,
|
|
|
- "id5": true,
|
|
|
- "id6": true,
|
|
|
- "id7": true,
|
|
|
- },
|
|
|
- "selectedGroupIds": Object {},
|
|
|
- "selectionElement": null,
|
|
|
- "shouldAddWatermark": false,
|
|
|
- "shouldCacheIgnoreZoom": false,
|
|
|
- "showShortcutsDialog": false,
|
|
|
- "startBoundElement": null,
|
|
|
- "suggestedBindings": Array [],
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- "width": 1024,
|
|
|
- "zenModeEnabled": false,
|
|
|
- "zoom": Object {
|
|
|
- "translation": Object {
|
|
|
- "x": 0,
|
|
|
- "y": 0,
|
|
|
- },
|
|
|
- "value": 1,
|
|
|
- },
|
|
|
-}
|
|
|
-`;
|
|
|
-
|
|
|
-exports[`regression tests resize an element, trying every resize handle: [resize handle ne (+5, +5)] element 0 1`] = `
|
|
|
-Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 5,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 9,
|
|
|
- "versionNonce": 915032327,
|
|
|
- "width": 15,
|
|
|
- "x": 10,
|
|
|
- "y": 15,
|
|
|
-}
|
|
|
-`;
|
|
|
-
|
|
|
-exports[`regression tests resize an element, trying every resize handle: [resize handle ne (+5, +5)] history 1`] = `
|
|
|
-Object {
|
|
|
- "recording": false,
|
|
|
- "redoStack": Array [],
|
|
|
- "stateHistory": Array [
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {},
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 10,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 2,
|
|
|
- "versionNonce": 1278240551,
|
|
|
- "width": 10,
|
|
|
- "x": 10,
|
|
|
- "y": 10,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 15,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 3,
|
|
|
- "versionNonce": 453191,
|
|
|
- "width": 15,
|
|
|
- "x": 5,
|
|
|
- "y": 5,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id2": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 10,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 4,
|
|
|
- "versionNonce": 2019559783,
|
|
|
- "width": 10,
|
|
|
- "x": 10,
|
|
|
- "y": 10,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id2": true,
|
|
|
- "id3": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 5,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 5,
|
|
|
- "versionNonce": 1116226695,
|
|
|
- "width": 5,
|
|
|
- "x": 15,
|
|
|
- "y": 15,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id2": true,
|
|
|
- "id3": true,
|
|
|
- "id4": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 10,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 6,
|
|
|
- "versionNonce": 238820263,
|
|
|
- "width": 10,
|
|
|
- "x": 10,
|
|
|
- "y": 10,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id2": true,
|
|
|
- "id3": true,
|
|
|
- "id4": true,
|
|
|
- "id5": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 15,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 7,
|
|
|
- "versionNonce": 1604849351,
|
|
|
- "width": 5,
|
|
|
- "x": 10,
|
|
|
- "y": 5,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id2": true,
|
|
|
- "id3": true,
|
|
|
- "id4": true,
|
|
|
- "id5": true,
|
|
|
- "id6": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 10,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 8,
|
|
|
- "versionNonce": 23633383,
|
|
|
- "width": 10,
|
|
|
- "x": 10,
|
|
|
- "y": 10,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id2": true,
|
|
|
- "id3": true,
|
|
|
- "id4": true,
|
|
|
- "id5": true,
|
|
|
- "id6": true,
|
|
|
- "id7": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 5,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 9,
|
|
|
- "versionNonce": 915032327,
|
|
|
- "width": 15,
|
|
|
- "x": 10,
|
|
|
- "y": 15,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- ],
|
|
|
-}
|
|
|
-`;
|
|
|
-
|
|
|
-exports[`regression tests resize an element, trying every resize handle: [resize handle ne (+5, +5)] number of elements 1`] = `1`;
|
|
|
-
|
|
|
-exports[`regression tests resize an element, trying every resize handle: [resize handle ne (+5, +5)] number of renders 1`] = `26`;
|
|
|
-
|
|
|
-exports[`regression tests resize an element, trying every resize handle: [resize handle ne (-5, -5)] appState 1`] = `
|
|
|
-Object {
|
|
|
- "appearance": "light",
|
|
|
- "collaborators": Map {},
|
|
|
- "currentItemBackgroundColor": "transparent",
|
|
|
- "currentItemFillStyle": "hachure",
|
|
|
- "currentItemFontFamily": 1,
|
|
|
- "currentItemFontSize": 20,
|
|
|
- "currentItemLinearStrokeSharpness": "round",
|
|
|
- "currentItemOpacity": 100,
|
|
|
- "currentItemRoughness": 1,
|
|
|
- "currentItemStrokeColor": "#000000",
|
|
|
- "currentItemStrokeSharpness": "sharp",
|
|
|
- "currentItemStrokeStyle": "solid",
|
|
|
- "currentItemStrokeWidth": 1,
|
|
|
- "currentItemTextAlign": "left",
|
|
|
- "cursorButton": "up",
|
|
|
- "cursorX": 0,
|
|
|
- "cursorY": 0,
|
|
|
- "draggingElement": null,
|
|
|
- "editingElement": null,
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "elementLocked": false,
|
|
|
- "elementType": "selection",
|
|
|
- "errorMessage": null,
|
|
|
- "exportBackground": true,
|
|
|
- "exportEmbedScene": false,
|
|
|
- "fileHandle": null,
|
|
|
- "gridSize": null,
|
|
|
- "height": 768,
|
|
|
- "isBindingEnabled": true,
|
|
|
- "isLibraryOpen": false,
|
|
|
- "isLoading": false,
|
|
|
- "isResizing": false,
|
|
|
- "isRotating": false,
|
|
|
- "lastPointerDownWith": "mouse",
|
|
|
- "multiElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "offsetLeft": 0,
|
|
|
- "offsetTop": 0,
|
|
|
- "openMenu": null,
|
|
|
- "previousSelectedElementIds": Object {},
|
|
|
- "resizingElement": null,
|
|
|
- "scrollX": 0,
|
|
|
- "scrollY": 0,
|
|
|
- "scrolledOutside": false,
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id2": true,
|
|
|
- "id3": true,
|
|
|
- "id4": true,
|
|
|
- "id5": true,
|
|
|
- },
|
|
|
- "selectedGroupIds": Object {},
|
|
|
- "selectionElement": null,
|
|
|
- "shouldAddWatermark": false,
|
|
|
- "shouldCacheIgnoreZoom": false,
|
|
|
- "showShortcutsDialog": false,
|
|
|
- "startBoundElement": null,
|
|
|
- "suggestedBindings": Array [],
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- "width": 1024,
|
|
|
- "zenModeEnabled": false,
|
|
|
- "zoom": Object {
|
|
|
- "translation": Object {
|
|
|
- "x": 0,
|
|
|
- "y": 0,
|
|
|
- },
|
|
|
- "value": 1,
|
|
|
- },
|
|
|
-}
|
|
|
-`;
|
|
|
-
|
|
|
-exports[`regression tests resize an element, trying every resize handle: [resize handle ne (-5, -5)] element 0 1`] = `
|
|
|
-Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 15,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 7,
|
|
|
- "versionNonce": 1604849351,
|
|
|
- "width": 5,
|
|
|
- "x": 10,
|
|
|
- "y": 5,
|
|
|
-}
|
|
|
-`;
|
|
|
-
|
|
|
-exports[`regression tests resize an element, trying every resize handle: [resize handle ne (-5, -5)] history 1`] = `
|
|
|
-Object {
|
|
|
- "recording": false,
|
|
|
- "redoStack": Array [],
|
|
|
- "stateHistory": Array [
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {},
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 10,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 2,
|
|
|
- "versionNonce": 1278240551,
|
|
|
- "width": 10,
|
|
|
- "x": 10,
|
|
|
- "y": 10,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 15,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 3,
|
|
|
- "versionNonce": 453191,
|
|
|
- "width": 15,
|
|
|
- "x": 5,
|
|
|
- "y": 5,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id2": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 10,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 4,
|
|
|
- "versionNonce": 2019559783,
|
|
|
- "width": 10,
|
|
|
- "x": 10,
|
|
|
- "y": 10,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id2": true,
|
|
|
- "id3": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 5,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 5,
|
|
|
- "versionNonce": 1116226695,
|
|
|
- "width": 5,
|
|
|
- "x": 15,
|
|
|
- "y": 15,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id2": true,
|
|
|
- "id3": true,
|
|
|
- "id4": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 10,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 6,
|
|
|
- "versionNonce": 238820263,
|
|
|
- "width": 10,
|
|
|
- "x": 10,
|
|
|
- "y": 10,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id2": true,
|
|
|
- "id3": true,
|
|
|
- "id4": true,
|
|
|
- "id5": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 15,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 7,
|
|
|
- "versionNonce": 1604849351,
|
|
|
- "width": 5,
|
|
|
- "x": 10,
|
|
|
- "y": 5,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- ],
|
|
|
-}
|
|
|
-`;
|
|
|
-
|
|
|
-exports[`regression tests resize an element, trying every resize handle: [resize handle ne (-5, -5)] number of elements 1`] = `1`;
|
|
|
-
|
|
|
-exports[`regression tests resize an element, trying every resize handle: [resize handle ne (-5, -5)] number of renders 1`] = `20`;
|
|
|
-
|
|
|
-exports[`regression tests resize an element, trying every resize handle: [resize handle nw (+5, +5)] appState 1`] = `
|
|
|
-Object {
|
|
|
- "appearance": "light",
|
|
|
- "collaborators": Map {},
|
|
|
- "currentItemBackgroundColor": "transparent",
|
|
|
- "currentItemFillStyle": "hachure",
|
|
|
- "currentItemFontFamily": 1,
|
|
|
- "currentItemFontSize": 20,
|
|
|
- "currentItemLinearStrokeSharpness": "round",
|
|
|
- "currentItemOpacity": 100,
|
|
|
- "currentItemRoughness": 1,
|
|
|
- "currentItemStrokeColor": "#000000",
|
|
|
- "currentItemStrokeSharpness": "sharp",
|
|
|
- "currentItemStrokeStyle": "solid",
|
|
|
- "currentItemStrokeWidth": 1,
|
|
|
- "currentItemTextAlign": "left",
|
|
|
- "cursorButton": "up",
|
|
|
- "cursorX": 0,
|
|
|
- "cursorY": 0,
|
|
|
- "draggingElement": null,
|
|
|
- "editingElement": null,
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "elementLocked": false,
|
|
|
- "elementType": "selection",
|
|
|
- "errorMessage": null,
|
|
|
- "exportBackground": true,
|
|
|
- "exportEmbedScene": false,
|
|
|
- "fileHandle": null,
|
|
|
- "gridSize": null,
|
|
|
- "height": 768,
|
|
|
- "isBindingEnabled": true,
|
|
|
- "isLibraryOpen": false,
|
|
|
- "isLoading": false,
|
|
|
- "isResizing": false,
|
|
|
- "isRotating": false,
|
|
|
- "lastPointerDownWith": "mouse",
|
|
|
- "multiElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "offsetLeft": 0,
|
|
|
- "offsetTop": 0,
|
|
|
- "openMenu": null,
|
|
|
- "previousSelectedElementIds": Object {},
|
|
|
- "resizingElement": null,
|
|
|
- "scrollX": 0,
|
|
|
- "scrollY": 0,
|
|
|
- "scrolledOutside": false,
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id2": true,
|
|
|
- "id3": true,
|
|
|
- },
|
|
|
- "selectedGroupIds": Object {},
|
|
|
- "selectionElement": null,
|
|
|
- "shouldAddWatermark": false,
|
|
|
- "shouldCacheIgnoreZoom": false,
|
|
|
- "showShortcutsDialog": false,
|
|
|
- "startBoundElement": null,
|
|
|
- "suggestedBindings": Array [],
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- "width": 1024,
|
|
|
- "zenModeEnabled": false,
|
|
|
- "zoom": Object {
|
|
|
- "translation": Object {
|
|
|
- "x": 0,
|
|
|
- "y": 0,
|
|
|
- },
|
|
|
- "value": 1,
|
|
|
- },
|
|
|
-}
|
|
|
-`;
|
|
|
-
|
|
|
-exports[`regression tests resize an element, trying every resize handle: [resize handle nw (+5, +5)] element 0 1`] = `
|
|
|
-Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 5,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 5,
|
|
|
- "versionNonce": 1116226695,
|
|
|
- "width": 5,
|
|
|
- "x": 15,
|
|
|
- "y": 15,
|
|
|
-}
|
|
|
-`;
|
|
|
-
|
|
|
-exports[`regression tests resize an element, trying every resize handle: [resize handle nw (+5, +5)] history 1`] = `
|
|
|
-Object {
|
|
|
- "recording": false,
|
|
|
- "redoStack": Array [],
|
|
|
- "stateHistory": Array [
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {},
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 10,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 2,
|
|
|
- "versionNonce": 1278240551,
|
|
|
- "width": 10,
|
|
|
- "x": 10,
|
|
|
- "y": 10,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 15,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 3,
|
|
|
- "versionNonce": 453191,
|
|
|
- "width": 15,
|
|
|
- "x": 5,
|
|
|
- "y": 5,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id2": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 10,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 4,
|
|
|
- "versionNonce": 2019559783,
|
|
|
- "width": 10,
|
|
|
- "x": 10,
|
|
|
- "y": 10,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id2": true,
|
|
|
- "id3": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 5,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 5,
|
|
|
- "versionNonce": 1116226695,
|
|
|
- "width": 5,
|
|
|
- "x": 15,
|
|
|
- "y": 15,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- ],
|
|
|
-}
|
|
|
-`;
|
|
|
-
|
|
|
-exports[`regression tests resize an element, trying every resize handle: [resize handle nw (+5, +5)] number of elements 1`] = `1`;
|
|
|
-
|
|
|
-exports[`regression tests resize an element, trying every resize handle: [resize handle nw (+5, +5)] number of renders 1`] = `14`;
|
|
|
-
|
|
|
-exports[`regression tests resize an element, trying every resize handle: [resize handle nw (-5, -5)] appState 1`] = `
|
|
|
-Object {
|
|
|
- "appearance": "light",
|
|
|
- "collaborators": Map {},
|
|
|
- "currentItemBackgroundColor": "transparent",
|
|
|
- "currentItemFillStyle": "hachure",
|
|
|
- "currentItemFontFamily": 1,
|
|
|
- "currentItemFontSize": 20,
|
|
|
- "currentItemLinearStrokeSharpness": "round",
|
|
|
- "currentItemOpacity": 100,
|
|
|
- "currentItemRoughness": 1,
|
|
|
- "currentItemStrokeColor": "#000000",
|
|
|
- "currentItemStrokeSharpness": "sharp",
|
|
|
- "currentItemStrokeStyle": "solid",
|
|
|
- "currentItemStrokeWidth": 1,
|
|
|
- "currentItemTextAlign": "left",
|
|
|
- "cursorButton": "up",
|
|
|
- "cursorX": 0,
|
|
|
- "cursorY": 0,
|
|
|
- "draggingElement": null,
|
|
|
- "editingElement": null,
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "elementLocked": false,
|
|
|
- "elementType": "selection",
|
|
|
- "errorMessage": null,
|
|
|
- "exportBackground": true,
|
|
|
- "exportEmbedScene": false,
|
|
|
- "fileHandle": null,
|
|
|
- "gridSize": null,
|
|
|
- "height": 768,
|
|
|
- "isBindingEnabled": true,
|
|
|
- "isLibraryOpen": false,
|
|
|
- "isLoading": false,
|
|
|
- "isResizing": false,
|
|
|
- "isRotating": false,
|
|
|
- "lastPointerDownWith": "mouse",
|
|
|
- "multiElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "offsetLeft": 0,
|
|
|
- "offsetTop": 0,
|
|
|
- "openMenu": null,
|
|
|
- "previousSelectedElementIds": Object {},
|
|
|
- "resizingElement": null,
|
|
|
- "scrollX": 0,
|
|
|
- "scrollY": 0,
|
|
|
- "scrolledOutside": false,
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- },
|
|
|
- "selectedGroupIds": Object {},
|
|
|
- "selectionElement": null,
|
|
|
- "shouldAddWatermark": false,
|
|
|
- "shouldCacheIgnoreZoom": false,
|
|
|
- "showShortcutsDialog": false,
|
|
|
- "startBoundElement": null,
|
|
|
- "suggestedBindings": Array [],
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- "width": 1024,
|
|
|
- "zenModeEnabled": false,
|
|
|
- "zoom": Object {
|
|
|
- "translation": Object {
|
|
|
- "x": 0,
|
|
|
- "y": 0,
|
|
|
- },
|
|
|
- "value": 1,
|
|
|
- },
|
|
|
-}
|
|
|
-`;
|
|
|
-
|
|
|
-exports[`regression tests resize an element, trying every resize handle: [resize handle nw (-5, -5)] element 0 1`] = `
|
|
|
-Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 15,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 3,
|
|
|
- "versionNonce": 453191,
|
|
|
- "width": 15,
|
|
|
- "x": 5,
|
|
|
- "y": 5,
|
|
|
-}
|
|
|
-`;
|
|
|
-
|
|
|
-exports[`regression tests resize an element, trying every resize handle: [resize handle nw (-5, -5)] history 1`] = `
|
|
|
-Object {
|
|
|
- "recording": false,
|
|
|
- "redoStack": Array [],
|
|
|
- "stateHistory": Array [
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {},
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 10,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 2,
|
|
|
- "versionNonce": 1278240551,
|
|
|
- "width": 10,
|
|
|
- "x": 10,
|
|
|
- "y": 10,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 15,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 3,
|
|
|
- "versionNonce": 453191,
|
|
|
- "width": 15,
|
|
|
- "x": 5,
|
|
|
- "y": 5,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- ],
|
|
|
-}
|
|
|
-`;
|
|
|
-
|
|
|
-exports[`regression tests resize an element, trying every resize handle: [resize handle nw (-5, -5)] number of elements 1`] = `1`;
|
|
|
-
|
|
|
-exports[`regression tests resize an element, trying every resize handle: [resize handle nw (-5, -5)] number of renders 1`] = `8`;
|
|
|
-
|
|
|
-exports[`regression tests resize an element, trying every resize handle: [resize handle se (+5, +5)] appState 1`] = `
|
|
|
-Object {
|
|
|
- "appearance": "light",
|
|
|
- "collaborators": Map {},
|
|
|
- "currentItemBackgroundColor": "transparent",
|
|
|
- "currentItemFillStyle": "hachure",
|
|
|
- "currentItemFontFamily": 1,
|
|
|
- "currentItemFontSize": 20,
|
|
|
- "currentItemLinearStrokeSharpness": "round",
|
|
|
- "currentItemOpacity": 100,
|
|
|
- "currentItemRoughness": 1,
|
|
|
- "currentItemStrokeColor": "#000000",
|
|
|
- "currentItemStrokeSharpness": "sharp",
|
|
|
- "currentItemStrokeStyle": "solid",
|
|
|
- "currentItemStrokeWidth": 1,
|
|
|
- "currentItemTextAlign": "left",
|
|
|
- "cursorButton": "up",
|
|
|
- "cursorX": 0,
|
|
|
- "cursorY": 0,
|
|
|
- "draggingElement": null,
|
|
|
- "editingElement": null,
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "elementLocked": false,
|
|
|
- "elementType": "selection",
|
|
|
- "errorMessage": null,
|
|
|
- "exportBackground": true,
|
|
|
- "exportEmbedScene": false,
|
|
|
- "fileHandle": null,
|
|
|
- "gridSize": null,
|
|
|
- "height": 768,
|
|
|
- "isBindingEnabled": true,
|
|
|
- "isLibraryOpen": false,
|
|
|
- "isLoading": false,
|
|
|
- "isResizing": false,
|
|
|
- "isRotating": false,
|
|
|
- "lastPointerDownWith": "mouse",
|
|
|
- "multiElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "offsetLeft": 0,
|
|
|
- "offsetTop": 0,
|
|
|
- "openMenu": null,
|
|
|
- "previousSelectedElementIds": Object {},
|
|
|
- "resizingElement": null,
|
|
|
- "scrollX": 0,
|
|
|
- "scrollY": 0,
|
|
|
- "scrolledOutside": false,
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id10": true,
|
|
|
- "id11": true,
|
|
|
- "id12": true,
|
|
|
- "id13": true,
|
|
|
- "id14": true,
|
|
|
- "id15": true,
|
|
|
- "id2": true,
|
|
|
- "id3": true,
|
|
|
- "id4": true,
|
|
|
- "id5": true,
|
|
|
- "id6": true,
|
|
|
- "id7": true,
|
|
|
- "id8": true,
|
|
|
- "id9": true,
|
|
|
- },
|
|
|
- "selectedGroupIds": Object {},
|
|
|
- "selectionElement": null,
|
|
|
- "shouldAddWatermark": false,
|
|
|
- "shouldCacheIgnoreZoom": false,
|
|
|
- "showShortcutsDialog": false,
|
|
|
- "startBoundElement": null,
|
|
|
- "suggestedBindings": Array [],
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- "width": 1024,
|
|
|
- "zenModeEnabled": false,
|
|
|
- "zoom": Object {
|
|
|
- "translation": Object {
|
|
|
- "x": 0,
|
|
|
- "y": 0,
|
|
|
- },
|
|
|
- "value": 1,
|
|
|
- },
|
|
|
-}
|
|
|
-`;
|
|
|
-
|
|
|
-exports[`regression tests resize an element, trying every resize handle: [resize handle se (+5, +5)] element 0 1`] = `
|
|
|
-Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 15,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 17,
|
|
|
- "versionNonce": 2004587015,
|
|
|
- "width": 15,
|
|
|
- "x": 10,
|
|
|
- "y": 10,
|
|
|
-}
|
|
|
-`;
|
|
|
-
|
|
|
-exports[`regression tests resize an element, trying every resize handle: [resize handle se (+5, +5)] history 1`] = `
|
|
|
-Object {
|
|
|
- "recording": false,
|
|
|
- "redoStack": Array [],
|
|
|
- "stateHistory": Array [
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {},
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 10,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 2,
|
|
|
- "versionNonce": 1278240551,
|
|
|
- "width": 10,
|
|
|
- "x": 10,
|
|
|
- "y": 10,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 15,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 3,
|
|
|
- "versionNonce": 453191,
|
|
|
- "width": 15,
|
|
|
- "x": 5,
|
|
|
- "y": 5,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id2": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 10,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 4,
|
|
|
- "versionNonce": 2019559783,
|
|
|
- "width": 10,
|
|
|
- "x": 10,
|
|
|
- "y": 10,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id2": true,
|
|
|
- "id3": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 5,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 5,
|
|
|
- "versionNonce": 1116226695,
|
|
|
- "width": 5,
|
|
|
- "x": 15,
|
|
|
- "y": 15,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id2": true,
|
|
|
- "id3": true,
|
|
|
- "id4": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 10,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 6,
|
|
|
- "versionNonce": 238820263,
|
|
|
- "width": 10,
|
|
|
- "x": 10,
|
|
|
- "y": 10,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id2": true,
|
|
|
- "id3": true,
|
|
|
- "id4": true,
|
|
|
- "id5": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 15,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 7,
|
|
|
- "versionNonce": 1604849351,
|
|
|
- "width": 5,
|
|
|
- "x": 10,
|
|
|
- "y": 5,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id2": true,
|
|
|
- "id3": true,
|
|
|
- "id4": true,
|
|
|
- "id5": true,
|
|
|
- "id6": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 10,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 8,
|
|
|
- "versionNonce": 23633383,
|
|
|
- "width": 10,
|
|
|
- "x": 10,
|
|
|
- "y": 10,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id2": true,
|
|
|
- "id3": true,
|
|
|
- "id4": true,
|
|
|
- "id5": true,
|
|
|
- "id6": true,
|
|
|
- "id7": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 5,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 9,
|
|
|
- "versionNonce": 915032327,
|
|
|
- "width": 15,
|
|
|
- "x": 10,
|
|
|
- "y": 15,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id2": true,
|
|
|
- "id3": true,
|
|
|
- "id4": true,
|
|
|
- "id5": true,
|
|
|
- "id6": true,
|
|
|
- "id7": true,
|
|
|
- "id8": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 10,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 10,
|
|
|
- "versionNonce": 747212839,
|
|
|
- "width": 10,
|
|
|
- "x": 10,
|
|
|
- "y": 10,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id2": true,
|
|
|
- "id3": true,
|
|
|
- "id4": true,
|
|
|
- "id5": true,
|
|
|
- "id6": true,
|
|
|
- "id7": true,
|
|
|
- "id8": true,
|
|
|
- "id9": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 5,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 11,
|
|
|
- "versionNonce": 760410951,
|
|
|
- "width": 15,
|
|
|
- "x": 5,
|
|
|
- "y": 10,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id10": true,
|
|
|
- "id2": true,
|
|
|
- "id3": true,
|
|
|
- "id4": true,
|
|
|
- "id5": true,
|
|
|
- "id6": true,
|
|
|
- "id7": true,
|
|
|
- "id8": true,
|
|
|
- "id9": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 10,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 12,
|
|
|
- "versionNonce": 289600103,
|
|
|
- "width": 10,
|
|
|
- "x": 10,
|
|
|
- "y": 10,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id10": true,
|
|
|
- "id11": true,
|
|
|
- "id2": true,
|
|
|
- "id3": true,
|
|
|
- "id4": true,
|
|
|
- "id5": true,
|
|
|
- "id6": true,
|
|
|
- "id7": true,
|
|
|
- "id8": true,
|
|
|
- "id9": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 15,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 13,
|
|
|
- "versionNonce": 1898319239,
|
|
|
- "width": 5,
|
|
|
- "x": 15,
|
|
|
- "y": 10,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id10": true,
|
|
|
- "id11": true,
|
|
|
- "id12": true,
|
|
|
- "id2": true,
|
|
|
- "id3": true,
|
|
|
- "id4": true,
|
|
|
- "id5": true,
|
|
|
- "id6": true,
|
|
|
- "id7": true,
|
|
|
- "id8": true,
|
|
|
- "id9": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 10,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 14,
|
|
|
- "versionNonce": 406373543,
|
|
|
- "width": 10,
|
|
|
- "x": 10,
|
|
|
- "y": 10,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id10": true,
|
|
|
- "id11": true,
|
|
|
- "id12": true,
|
|
|
- "id13": true,
|
|
|
- "id2": true,
|
|
|
- "id3": true,
|
|
|
- "id4": true,
|
|
|
- "id5": true,
|
|
|
- "id6": true,
|
|
|
- "id7": true,
|
|
|
- "id8": true,
|
|
|
- "id9": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 5,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 15,
|
|
|
- "versionNonce": 908564423,
|
|
|
- "width": 5,
|
|
|
- "x": 10,
|
|
|
- "y": 10,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id10": true,
|
|
|
- "id11": true,
|
|
|
- "id12": true,
|
|
|
- "id13": true,
|
|
|
- "id14": true,
|
|
|
- "id2": true,
|
|
|
- "id3": true,
|
|
|
- "id4": true,
|
|
|
- "id5": true,
|
|
|
- "id6": true,
|
|
|
- "id7": true,
|
|
|
- "id8": true,
|
|
|
- "id9": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 10,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 16,
|
|
|
- "versionNonce": 1359939303,
|
|
|
- "width": 10,
|
|
|
- "x": 10,
|
|
|
- "y": 10,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id10": true,
|
|
|
- "id11": true,
|
|
|
- "id12": true,
|
|
|
- "id13": true,
|
|
|
- "id14": true,
|
|
|
- "id15": true,
|
|
|
- "id2": true,
|
|
|
- "id3": true,
|
|
|
- "id4": true,
|
|
|
- "id5": true,
|
|
|
- "id6": true,
|
|
|
- "id7": true,
|
|
|
- "id8": true,
|
|
|
- "id9": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 15,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 17,
|
|
|
- "versionNonce": 2004587015,
|
|
|
- "width": 15,
|
|
|
- "x": 10,
|
|
|
- "y": 10,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- ],
|
|
|
-}
|
|
|
-`;
|
|
|
-
|
|
|
-exports[`regression tests resize an element, trying every resize handle: [resize handle se (+5, +5)] number of elements 1`] = `1`;
|
|
|
-
|
|
|
-exports[`regression tests resize an element, trying every resize handle: [resize handle se (+5, +5)] number of renders 1`] = `50`;
|
|
|
-
|
|
|
-exports[`regression tests resize an element, trying every resize handle: [resize handle se (-5, -5)] appState 1`] = `
|
|
|
-Object {
|
|
|
- "appearance": "light",
|
|
|
- "collaborators": Map {},
|
|
|
- "currentItemBackgroundColor": "transparent",
|
|
|
- "currentItemFillStyle": "hachure",
|
|
|
- "currentItemFontFamily": 1,
|
|
|
- "currentItemFontSize": 20,
|
|
|
- "currentItemLinearStrokeSharpness": "round",
|
|
|
- "currentItemOpacity": 100,
|
|
|
- "currentItemRoughness": 1,
|
|
|
- "currentItemStrokeColor": "#000000",
|
|
|
- "currentItemStrokeSharpness": "sharp",
|
|
|
- "currentItemStrokeStyle": "solid",
|
|
|
- "currentItemStrokeWidth": 1,
|
|
|
- "currentItemTextAlign": "left",
|
|
|
- "cursorButton": "up",
|
|
|
- "cursorX": 0,
|
|
|
- "cursorY": 0,
|
|
|
- "draggingElement": null,
|
|
|
- "editingElement": null,
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "elementLocked": false,
|
|
|
- "elementType": "selection",
|
|
|
- "errorMessage": null,
|
|
|
- "exportBackground": true,
|
|
|
- "exportEmbedScene": false,
|
|
|
- "fileHandle": null,
|
|
|
- "gridSize": null,
|
|
|
- "height": 768,
|
|
|
- "isBindingEnabled": true,
|
|
|
- "isLibraryOpen": false,
|
|
|
- "isLoading": false,
|
|
|
- "isResizing": false,
|
|
|
- "isRotating": false,
|
|
|
- "lastPointerDownWith": "mouse",
|
|
|
- "multiElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "offsetLeft": 0,
|
|
|
- "offsetTop": 0,
|
|
|
- "openMenu": null,
|
|
|
- "previousSelectedElementIds": Object {},
|
|
|
- "resizingElement": null,
|
|
|
- "scrollX": 0,
|
|
|
- "scrollY": 0,
|
|
|
- "scrolledOutside": false,
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id10": true,
|
|
|
- "id11": true,
|
|
|
- "id12": true,
|
|
|
- "id13": true,
|
|
|
- "id2": true,
|
|
|
- "id3": true,
|
|
|
- "id4": true,
|
|
|
- "id5": true,
|
|
|
- "id6": true,
|
|
|
- "id7": true,
|
|
|
- "id8": true,
|
|
|
- "id9": true,
|
|
|
- },
|
|
|
- "selectedGroupIds": Object {},
|
|
|
- "selectionElement": null,
|
|
|
- "shouldAddWatermark": false,
|
|
|
- "shouldCacheIgnoreZoom": false,
|
|
|
- "showShortcutsDialog": false,
|
|
|
- "startBoundElement": null,
|
|
|
- "suggestedBindings": Array [],
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- "width": 1024,
|
|
|
- "zenModeEnabled": false,
|
|
|
- "zoom": Object {
|
|
|
- "translation": Object {
|
|
|
- "x": 0,
|
|
|
- "y": 0,
|
|
|
- },
|
|
|
- "value": 1,
|
|
|
- },
|
|
|
-}
|
|
|
-`;
|
|
|
-
|
|
|
-exports[`regression tests resize an element, trying every resize handle: [resize handle se (-5, -5)] element 0 1`] = `
|
|
|
-Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 5,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 15,
|
|
|
- "versionNonce": 908564423,
|
|
|
- "width": 5,
|
|
|
- "x": 10,
|
|
|
- "y": 10,
|
|
|
-}
|
|
|
-`;
|
|
|
-
|
|
|
-exports[`regression tests resize an element, trying every resize handle: [resize handle se (-5, -5)] history 1`] = `
|
|
|
-Object {
|
|
|
- "recording": false,
|
|
|
- "redoStack": Array [],
|
|
|
- "stateHistory": Array [
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {},
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 10,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 2,
|
|
|
- "versionNonce": 1278240551,
|
|
|
- "width": 10,
|
|
|
- "x": 10,
|
|
|
- "y": 10,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 15,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 3,
|
|
|
- "versionNonce": 453191,
|
|
|
- "width": 15,
|
|
|
- "x": 5,
|
|
|
- "y": 5,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id2": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 10,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 4,
|
|
|
- "versionNonce": 2019559783,
|
|
|
- "width": 10,
|
|
|
- "x": 10,
|
|
|
- "y": 10,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id2": true,
|
|
|
- "id3": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 5,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 5,
|
|
|
- "versionNonce": 1116226695,
|
|
|
- "width": 5,
|
|
|
- "x": 15,
|
|
|
- "y": 15,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id2": true,
|
|
|
- "id3": true,
|
|
|
- "id4": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 10,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 6,
|
|
|
- "versionNonce": 238820263,
|
|
|
- "width": 10,
|
|
|
- "x": 10,
|
|
|
- "y": 10,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id2": true,
|
|
|
- "id3": true,
|
|
|
- "id4": true,
|
|
|
- "id5": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 15,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 7,
|
|
|
- "versionNonce": 1604849351,
|
|
|
- "width": 5,
|
|
|
- "x": 10,
|
|
|
- "y": 5,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id2": true,
|
|
|
- "id3": true,
|
|
|
- "id4": true,
|
|
|
- "id5": true,
|
|
|
- "id6": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 10,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 8,
|
|
|
- "versionNonce": 23633383,
|
|
|
- "width": 10,
|
|
|
- "x": 10,
|
|
|
- "y": 10,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id2": true,
|
|
|
- "id3": true,
|
|
|
- "id4": true,
|
|
|
- "id5": true,
|
|
|
- "id6": true,
|
|
|
- "id7": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 5,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 9,
|
|
|
- "versionNonce": 915032327,
|
|
|
- "width": 15,
|
|
|
- "x": 10,
|
|
|
- "y": 15,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id2": true,
|
|
|
- "id3": true,
|
|
|
- "id4": true,
|
|
|
- "id5": true,
|
|
|
- "id6": true,
|
|
|
- "id7": true,
|
|
|
- "id8": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 10,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 10,
|
|
|
- "versionNonce": 747212839,
|
|
|
- "width": 10,
|
|
|
- "x": 10,
|
|
|
- "y": 10,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id2": true,
|
|
|
- "id3": true,
|
|
|
- "id4": true,
|
|
|
- "id5": true,
|
|
|
- "id6": true,
|
|
|
- "id7": true,
|
|
|
- "id8": true,
|
|
|
- "id9": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 5,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 11,
|
|
|
- "versionNonce": 760410951,
|
|
|
- "width": 15,
|
|
|
- "x": 5,
|
|
|
- "y": 10,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id10": true,
|
|
|
- "id2": true,
|
|
|
- "id3": true,
|
|
|
- "id4": true,
|
|
|
- "id5": true,
|
|
|
- "id6": true,
|
|
|
- "id7": true,
|
|
|
- "id8": true,
|
|
|
- "id9": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 10,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 12,
|
|
|
- "versionNonce": 289600103,
|
|
|
- "width": 10,
|
|
|
- "x": 10,
|
|
|
- "y": 10,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id10": true,
|
|
|
- "id11": true,
|
|
|
- "id2": true,
|
|
|
- "id3": true,
|
|
|
- "id4": true,
|
|
|
- "id5": true,
|
|
|
- "id6": true,
|
|
|
- "id7": true,
|
|
|
- "id8": true,
|
|
|
- "id9": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 15,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 13,
|
|
|
- "versionNonce": 1898319239,
|
|
|
- "width": 5,
|
|
|
- "x": 15,
|
|
|
- "y": 10,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id10": true,
|
|
|
- "id11": true,
|
|
|
- "id12": true,
|
|
|
- "id2": true,
|
|
|
- "id3": true,
|
|
|
- "id4": true,
|
|
|
- "id5": true,
|
|
|
- "id6": true,
|
|
|
- "id7": true,
|
|
|
- "id8": true,
|
|
|
- "id9": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 10,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 14,
|
|
|
- "versionNonce": 406373543,
|
|
|
- "width": 10,
|
|
|
- "x": 10,
|
|
|
- "y": 10,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id10": true,
|
|
|
- "id11": true,
|
|
|
- "id12": true,
|
|
|
- "id13": true,
|
|
|
- "id2": true,
|
|
|
- "id3": true,
|
|
|
- "id4": true,
|
|
|
- "id5": true,
|
|
|
- "id6": true,
|
|
|
- "id7": true,
|
|
|
- "id8": true,
|
|
|
- "id9": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 5,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 15,
|
|
|
- "versionNonce": 908564423,
|
|
|
- "width": 5,
|
|
|
- "x": 10,
|
|
|
- "y": 10,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- ],
|
|
|
-}
|
|
|
-`;
|
|
|
-
|
|
|
-exports[`regression tests resize an element, trying every resize handle: [resize handle se (-5, -5)] number of elements 1`] = `1`;
|
|
|
-
|
|
|
-exports[`regression tests resize an element, trying every resize handle: [resize handle se (-5, -5)] number of renders 1`] = `44`;
|
|
|
-
|
|
|
-exports[`regression tests resize an element, trying every resize handle: [resize handle sw (+5, +5)] appState 1`] = `
|
|
|
-Object {
|
|
|
- "appearance": "light",
|
|
|
- "collaborators": Map {},
|
|
|
- "currentItemBackgroundColor": "transparent",
|
|
|
- "currentItemFillStyle": "hachure",
|
|
|
- "currentItemFontFamily": 1,
|
|
|
- "currentItemFontSize": 20,
|
|
|
- "currentItemLinearStrokeSharpness": "round",
|
|
|
- "currentItemOpacity": 100,
|
|
|
- "currentItemRoughness": 1,
|
|
|
- "currentItemStrokeColor": "#000000",
|
|
|
- "currentItemStrokeSharpness": "sharp",
|
|
|
- "currentItemStrokeStyle": "solid",
|
|
|
- "currentItemStrokeWidth": 1,
|
|
|
- "currentItemTextAlign": "left",
|
|
|
- "cursorButton": "up",
|
|
|
- "cursorX": 0,
|
|
|
- "cursorY": 0,
|
|
|
- "draggingElement": null,
|
|
|
- "editingElement": null,
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "elementLocked": false,
|
|
|
- "elementType": "selection",
|
|
|
- "errorMessage": null,
|
|
|
- "exportBackground": true,
|
|
|
- "exportEmbedScene": false,
|
|
|
- "fileHandle": null,
|
|
|
- "gridSize": null,
|
|
|
- "height": 768,
|
|
|
- "isBindingEnabled": true,
|
|
|
- "isLibraryOpen": false,
|
|
|
- "isLoading": false,
|
|
|
- "isResizing": false,
|
|
|
- "isRotating": false,
|
|
|
- "lastPointerDownWith": "mouse",
|
|
|
- "multiElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "offsetLeft": 0,
|
|
|
- "offsetTop": 0,
|
|
|
- "openMenu": null,
|
|
|
- "previousSelectedElementIds": Object {},
|
|
|
- "resizingElement": null,
|
|
|
- "scrollX": 0,
|
|
|
- "scrollY": 0,
|
|
|
- "scrolledOutside": false,
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id10": true,
|
|
|
- "id11": true,
|
|
|
- "id2": true,
|
|
|
- "id3": true,
|
|
|
- "id4": true,
|
|
|
- "id5": true,
|
|
|
- "id6": true,
|
|
|
- "id7": true,
|
|
|
- "id8": true,
|
|
|
- "id9": true,
|
|
|
- },
|
|
|
- "selectedGroupIds": Object {},
|
|
|
- "selectionElement": null,
|
|
|
- "shouldAddWatermark": false,
|
|
|
- "shouldCacheIgnoreZoom": false,
|
|
|
- "showShortcutsDialog": false,
|
|
|
- "startBoundElement": null,
|
|
|
- "suggestedBindings": Array [],
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- "width": 1024,
|
|
|
- "zenModeEnabled": false,
|
|
|
- "zoom": Object {
|
|
|
- "translation": Object {
|
|
|
- "x": 0,
|
|
|
- "y": 0,
|
|
|
- },
|
|
|
- "value": 1,
|
|
|
- },
|
|
|
-}
|
|
|
-`;
|
|
|
-
|
|
|
-exports[`regression tests resize an element, trying every resize handle: [resize handle sw (+5, +5)] element 0 1`] = `
|
|
|
-Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 15,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 13,
|
|
|
- "versionNonce": 1898319239,
|
|
|
- "width": 5,
|
|
|
- "x": 15,
|
|
|
- "y": 10,
|
|
|
-}
|
|
|
-`;
|
|
|
-
|
|
|
-exports[`regression tests resize an element, trying every resize handle: [resize handle sw (+5, +5)] history 1`] = `
|
|
|
-Object {
|
|
|
- "recording": false,
|
|
|
- "redoStack": Array [],
|
|
|
- "stateHistory": Array [
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {},
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 10,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 2,
|
|
|
- "versionNonce": 1278240551,
|
|
|
- "width": 10,
|
|
|
- "x": 10,
|
|
|
- "y": 10,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 15,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 3,
|
|
|
- "versionNonce": 453191,
|
|
|
- "width": 15,
|
|
|
- "x": 5,
|
|
|
- "y": 5,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id2": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 10,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 4,
|
|
|
- "versionNonce": 2019559783,
|
|
|
- "width": 10,
|
|
|
- "x": 10,
|
|
|
- "y": 10,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id2": true,
|
|
|
- "id3": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 5,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 5,
|
|
|
- "versionNonce": 1116226695,
|
|
|
- "width": 5,
|
|
|
- "x": 15,
|
|
|
- "y": 15,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id2": true,
|
|
|
- "id3": true,
|
|
|
- "id4": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 10,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 6,
|
|
|
- "versionNonce": 238820263,
|
|
|
- "width": 10,
|
|
|
- "x": 10,
|
|
|
- "y": 10,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id2": true,
|
|
|
- "id3": true,
|
|
|
- "id4": true,
|
|
|
- "id5": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 15,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 7,
|
|
|
- "versionNonce": 1604849351,
|
|
|
- "width": 5,
|
|
|
- "x": 10,
|
|
|
- "y": 5,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id2": true,
|
|
|
- "id3": true,
|
|
|
- "id4": true,
|
|
|
- "id5": true,
|
|
|
- "id6": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 10,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 8,
|
|
|
- "versionNonce": 23633383,
|
|
|
- "width": 10,
|
|
|
- "x": 10,
|
|
|
- "y": 10,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id2": true,
|
|
|
- "id3": true,
|
|
|
- "id4": true,
|
|
|
- "id5": true,
|
|
|
- "id6": true,
|
|
|
- "id7": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 5,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 9,
|
|
|
- "versionNonce": 915032327,
|
|
|
- "width": 15,
|
|
|
- "x": 10,
|
|
|
- "y": 15,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id2": true,
|
|
|
- "id3": true,
|
|
|
- "id4": true,
|
|
|
- "id5": true,
|
|
|
- "id6": true,
|
|
|
- "id7": true,
|
|
|
- "id8": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 10,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 10,
|
|
|
- "versionNonce": 747212839,
|
|
|
- "width": 10,
|
|
|
- "x": 10,
|
|
|
- "y": 10,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id2": true,
|
|
|
- "id3": true,
|
|
|
- "id4": true,
|
|
|
- "id5": true,
|
|
|
- "id6": true,
|
|
|
- "id7": true,
|
|
|
- "id8": true,
|
|
|
- "id9": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 5,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 11,
|
|
|
- "versionNonce": 760410951,
|
|
|
- "width": 15,
|
|
|
- "x": 5,
|
|
|
- "y": 10,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id10": true,
|
|
|
- "id2": true,
|
|
|
- "id3": true,
|
|
|
- "id4": true,
|
|
|
- "id5": true,
|
|
|
- "id6": true,
|
|
|
- "id7": true,
|
|
|
- "id8": true,
|
|
|
- "id9": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 10,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 12,
|
|
|
- "versionNonce": 289600103,
|
|
|
- "width": 10,
|
|
|
- "x": 10,
|
|
|
- "y": 10,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id10": true,
|
|
|
- "id11": true,
|
|
|
- "id2": true,
|
|
|
- "id3": true,
|
|
|
- "id4": true,
|
|
|
- "id5": true,
|
|
|
- "id6": true,
|
|
|
- "id7": true,
|
|
|
- "id8": true,
|
|
|
- "id9": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 15,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 13,
|
|
|
- "versionNonce": 1898319239,
|
|
|
- "width": 5,
|
|
|
- "x": 15,
|
|
|
- "y": 10,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- ],
|
|
|
-}
|
|
|
-`;
|
|
|
-
|
|
|
-exports[`regression tests resize an element, trying every resize handle: [resize handle sw (+5, +5)] number of elements 1`] = `1`;
|
|
|
-
|
|
|
-exports[`regression tests resize an element, trying every resize handle: [resize handle sw (+5, +5)] number of renders 1`] = `38`;
|
|
|
-
|
|
|
-exports[`regression tests resize an element, trying every resize handle: [resize handle sw (-5, -5)] appState 1`] = `
|
|
|
-Object {
|
|
|
- "appearance": "light",
|
|
|
- "collaborators": Map {},
|
|
|
- "currentItemBackgroundColor": "transparent",
|
|
|
- "currentItemFillStyle": "hachure",
|
|
|
- "currentItemFontFamily": 1,
|
|
|
- "currentItemFontSize": 20,
|
|
|
- "currentItemLinearStrokeSharpness": "round",
|
|
|
- "currentItemOpacity": 100,
|
|
|
- "currentItemRoughness": 1,
|
|
|
- "currentItemStrokeColor": "#000000",
|
|
|
- "currentItemStrokeSharpness": "sharp",
|
|
|
- "currentItemStrokeStyle": "solid",
|
|
|
- "currentItemStrokeWidth": 1,
|
|
|
- "currentItemTextAlign": "left",
|
|
|
- "cursorButton": "up",
|
|
|
- "cursorX": 0,
|
|
|
- "cursorY": 0,
|
|
|
- "draggingElement": null,
|
|
|
- "editingElement": null,
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "elementLocked": false,
|
|
|
- "elementType": "selection",
|
|
|
- "errorMessage": null,
|
|
|
- "exportBackground": true,
|
|
|
- "exportEmbedScene": false,
|
|
|
- "fileHandle": null,
|
|
|
- "gridSize": null,
|
|
|
- "height": 768,
|
|
|
- "isBindingEnabled": true,
|
|
|
- "isLibraryOpen": false,
|
|
|
- "isLoading": false,
|
|
|
- "isResizing": false,
|
|
|
- "isRotating": false,
|
|
|
- "lastPointerDownWith": "mouse",
|
|
|
- "multiElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "offsetLeft": 0,
|
|
|
- "offsetTop": 0,
|
|
|
- "openMenu": null,
|
|
|
- "previousSelectedElementIds": Object {},
|
|
|
- "resizingElement": null,
|
|
|
- "scrollX": 0,
|
|
|
- "scrollY": 0,
|
|
|
- "scrolledOutside": false,
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id2": true,
|
|
|
- "id3": true,
|
|
|
- "id4": true,
|
|
|
- "id5": true,
|
|
|
- "id6": true,
|
|
|
- "id7": true,
|
|
|
- "id8": true,
|
|
|
- "id9": true,
|
|
|
- },
|
|
|
- "selectedGroupIds": Object {},
|
|
|
- "selectionElement": null,
|
|
|
- "shouldAddWatermark": false,
|
|
|
- "shouldCacheIgnoreZoom": false,
|
|
|
- "showShortcutsDialog": false,
|
|
|
- "startBoundElement": null,
|
|
|
- "suggestedBindings": Array [],
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- "width": 1024,
|
|
|
- "zenModeEnabled": false,
|
|
|
- "zoom": Object {
|
|
|
- "translation": Object {
|
|
|
- "x": 0,
|
|
|
- "y": 0,
|
|
|
- },
|
|
|
- "value": 1,
|
|
|
- },
|
|
|
-}
|
|
|
-`;
|
|
|
-
|
|
|
-exports[`regression tests resize an element, trying every resize handle: [resize handle sw (-5, -5)] element 0 1`] = `
|
|
|
-Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 5,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 11,
|
|
|
- "versionNonce": 760410951,
|
|
|
- "width": 15,
|
|
|
- "x": 5,
|
|
|
- "y": 10,
|
|
|
-}
|
|
|
-`;
|
|
|
-
|
|
|
-exports[`regression tests resize an element, trying every resize handle: [resize handle sw (-5, -5)] history 1`] = `
|
|
|
-Object {
|
|
|
- "recording": false,
|
|
|
- "redoStack": Array [],
|
|
|
- "stateHistory": Array [
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {},
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 10,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 2,
|
|
|
- "versionNonce": 1278240551,
|
|
|
- "width": 10,
|
|
|
- "x": 10,
|
|
|
- "y": 10,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 15,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 3,
|
|
|
- "versionNonce": 453191,
|
|
|
- "width": 15,
|
|
|
- "x": 5,
|
|
|
- "y": 5,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id2": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 10,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 4,
|
|
|
- "versionNonce": 2019559783,
|
|
|
- "width": 10,
|
|
|
- "x": 10,
|
|
|
- "y": 10,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id2": true,
|
|
|
- "id3": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 5,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 5,
|
|
|
- "versionNonce": 1116226695,
|
|
|
- "width": 5,
|
|
|
- "x": 15,
|
|
|
- "y": 15,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id2": true,
|
|
|
- "id3": true,
|
|
|
- "id4": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 10,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 6,
|
|
|
- "versionNonce": 238820263,
|
|
|
- "width": 10,
|
|
|
- "x": 10,
|
|
|
- "y": 10,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id2": true,
|
|
|
- "id3": true,
|
|
|
- "id4": true,
|
|
|
- "id5": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 15,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 7,
|
|
|
- "versionNonce": 1604849351,
|
|
|
- "width": 5,
|
|
|
- "x": 10,
|
|
|
- "y": 5,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id2": true,
|
|
|
- "id3": true,
|
|
|
- "id4": true,
|
|
|
- "id5": true,
|
|
|
- "id6": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 10,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 8,
|
|
|
- "versionNonce": 23633383,
|
|
|
- "width": 10,
|
|
|
- "x": 10,
|
|
|
- "y": 10,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id2": true,
|
|
|
- "id3": true,
|
|
|
- "id4": true,
|
|
|
- "id5": true,
|
|
|
- "id6": true,
|
|
|
- "id7": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 5,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 9,
|
|
|
- "versionNonce": 915032327,
|
|
|
- "width": 15,
|
|
|
- "x": 10,
|
|
|
- "y": 15,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id2": true,
|
|
|
- "id3": true,
|
|
|
- "id4": true,
|
|
|
- "id5": true,
|
|
|
- "id6": true,
|
|
|
- "id7": true,
|
|
|
- "id8": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 10,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 10,
|
|
|
- "versionNonce": 747212839,
|
|
|
- "width": 10,
|
|
|
- "x": 10,
|
|
|
- "y": 10,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id2": true,
|
|
|
- "id3": true,
|
|
|
- "id4": true,
|
|
|
- "id5": true,
|
|
|
- "id6": true,
|
|
|
- "id7": true,
|
|
|
- "id8": true,
|
|
|
- "id9": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 5,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 11,
|
|
|
- "versionNonce": 760410951,
|
|
|
- "width": 15,
|
|
|
- "x": 5,
|
|
|
- "y": 10,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- ],
|
|
|
-}
|
|
|
-`;
|
|
|
-
|
|
|
-exports[`regression tests resize an element, trying every resize handle: [resize handle sw (-5, -5)] number of elements 1`] = `1`;
|
|
|
-
|
|
|
-exports[`regression tests resize an element, trying every resize handle: [resize handle sw (-5, -5)] number of renders 1`] = `32`;
|
|
|
-
|
|
|
-exports[`regression tests resize an element, trying every resize handle: [unresize handle ne (+5, +5)] appState 1`] = `
|
|
|
-Object {
|
|
|
- "appearance": "light",
|
|
|
- "collaborators": Map {},
|
|
|
- "currentItemBackgroundColor": "transparent",
|
|
|
- "currentItemFillStyle": "hachure",
|
|
|
- "currentItemFontFamily": 1,
|
|
|
- "currentItemFontSize": 20,
|
|
|
- "currentItemLinearStrokeSharpness": "round",
|
|
|
- "currentItemOpacity": 100,
|
|
|
- "currentItemRoughness": 1,
|
|
|
- "currentItemStrokeColor": "#000000",
|
|
|
- "currentItemStrokeSharpness": "sharp",
|
|
|
- "currentItemStrokeStyle": "solid",
|
|
|
- "currentItemStrokeWidth": 1,
|
|
|
- "currentItemTextAlign": "left",
|
|
|
- "cursorButton": "up",
|
|
|
- "cursorX": 0,
|
|
|
- "cursorY": 0,
|
|
|
- "draggingElement": null,
|
|
|
- "editingElement": null,
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "elementLocked": false,
|
|
|
- "elementType": "selection",
|
|
|
- "errorMessage": null,
|
|
|
- "exportBackground": true,
|
|
|
- "exportEmbedScene": false,
|
|
|
- "fileHandle": null,
|
|
|
- "gridSize": null,
|
|
|
- "height": 768,
|
|
|
- "isBindingEnabled": true,
|
|
|
- "isLibraryOpen": false,
|
|
|
- "isLoading": false,
|
|
|
- "isResizing": false,
|
|
|
- "isRotating": false,
|
|
|
- "lastPointerDownWith": "mouse",
|
|
|
- "multiElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "offsetLeft": 0,
|
|
|
- "offsetTop": 0,
|
|
|
- "openMenu": null,
|
|
|
- "previousSelectedElementIds": Object {},
|
|
|
- "resizingElement": null,
|
|
|
- "scrollX": 0,
|
|
|
- "scrollY": 0,
|
|
|
- "scrolledOutside": false,
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id2": true,
|
|
|
- "id3": true,
|
|
|
- "id4": true,
|
|
|
- "id5": true,
|
|
|
- "id6": true,
|
|
|
- "id7": true,
|
|
|
- "id8": true,
|
|
|
- },
|
|
|
- "selectedGroupIds": Object {},
|
|
|
- "selectionElement": null,
|
|
|
- "shouldAddWatermark": false,
|
|
|
- "shouldCacheIgnoreZoom": false,
|
|
|
- "showShortcutsDialog": false,
|
|
|
- "startBoundElement": null,
|
|
|
- "suggestedBindings": Array [],
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- "width": 1024,
|
|
|
- "zenModeEnabled": false,
|
|
|
- "zoom": Object {
|
|
|
- "translation": Object {
|
|
|
- "x": 0,
|
|
|
- "y": 0,
|
|
|
- },
|
|
|
- "value": 1,
|
|
|
- },
|
|
|
-}
|
|
|
-`;
|
|
|
-
|
|
|
-exports[`regression tests resize an element, trying every resize handle: [unresize handle ne (+5, +5)] element 0 1`] = `
|
|
|
-Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 10,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 10,
|
|
|
- "versionNonce": 747212839,
|
|
|
- "width": 10,
|
|
|
- "x": 10,
|
|
|
- "y": 10,
|
|
|
-}
|
|
|
-`;
|
|
|
-
|
|
|
-exports[`regression tests resize an element, trying every resize handle: [unresize handle ne (+5, +5)] history 1`] = `
|
|
|
-Object {
|
|
|
- "recording": false,
|
|
|
- "redoStack": Array [],
|
|
|
- "stateHistory": Array [
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {},
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 10,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 2,
|
|
|
- "versionNonce": 1278240551,
|
|
|
- "width": 10,
|
|
|
- "x": 10,
|
|
|
- "y": 10,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 15,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 3,
|
|
|
- "versionNonce": 453191,
|
|
|
- "width": 15,
|
|
|
- "x": 5,
|
|
|
- "y": 5,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id2": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 10,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 4,
|
|
|
- "versionNonce": 2019559783,
|
|
|
- "width": 10,
|
|
|
- "x": 10,
|
|
|
- "y": 10,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id2": true,
|
|
|
- "id3": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 5,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 5,
|
|
|
- "versionNonce": 1116226695,
|
|
|
- "width": 5,
|
|
|
- "x": 15,
|
|
|
- "y": 15,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id2": true,
|
|
|
- "id3": true,
|
|
|
- "id4": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 10,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 6,
|
|
|
- "versionNonce": 238820263,
|
|
|
- "width": 10,
|
|
|
- "x": 10,
|
|
|
- "y": 10,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id2": true,
|
|
|
- "id3": true,
|
|
|
- "id4": true,
|
|
|
- "id5": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 15,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 7,
|
|
|
- "versionNonce": 1604849351,
|
|
|
- "width": 5,
|
|
|
- "x": 10,
|
|
|
- "y": 5,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id2": true,
|
|
|
- "id3": true,
|
|
|
- "id4": true,
|
|
|
- "id5": true,
|
|
|
- "id6": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 10,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 8,
|
|
|
- "versionNonce": 23633383,
|
|
|
- "width": 10,
|
|
|
- "x": 10,
|
|
|
- "y": 10,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id2": true,
|
|
|
- "id3": true,
|
|
|
- "id4": true,
|
|
|
- "id5": true,
|
|
|
- "id6": true,
|
|
|
- "id7": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 5,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 9,
|
|
|
- "versionNonce": 915032327,
|
|
|
- "width": 15,
|
|
|
- "x": 10,
|
|
|
- "y": 15,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id2": true,
|
|
|
- "id3": true,
|
|
|
- "id4": true,
|
|
|
- "id5": true,
|
|
|
- "id6": true,
|
|
|
- "id7": true,
|
|
|
- "id8": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 10,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 10,
|
|
|
- "versionNonce": 747212839,
|
|
|
- "width": 10,
|
|
|
- "x": 10,
|
|
|
- "y": 10,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- ],
|
|
|
-}
|
|
|
-`;
|
|
|
-
|
|
|
-exports[`regression tests resize an element, trying every resize handle: [unresize handle ne (+5, +5)] number of elements 1`] = `1`;
|
|
|
-
|
|
|
-exports[`regression tests resize an element, trying every resize handle: [unresize handle ne (+5, +5)] number of renders 1`] = `29`;
|
|
|
-
|
|
|
-exports[`regression tests resize an element, trying every resize handle: [unresize handle ne (-5, -5)] appState 1`] = `
|
|
|
-Object {
|
|
|
- "appearance": "light",
|
|
|
- "collaborators": Map {},
|
|
|
- "currentItemBackgroundColor": "transparent",
|
|
|
- "currentItemFillStyle": "hachure",
|
|
|
- "currentItemFontFamily": 1,
|
|
|
- "currentItemFontSize": 20,
|
|
|
- "currentItemLinearStrokeSharpness": "round",
|
|
|
- "currentItemOpacity": 100,
|
|
|
- "currentItemRoughness": 1,
|
|
|
- "currentItemStrokeColor": "#000000",
|
|
|
- "currentItemStrokeSharpness": "sharp",
|
|
|
- "currentItemStrokeStyle": "solid",
|
|
|
- "currentItemStrokeWidth": 1,
|
|
|
- "currentItemTextAlign": "left",
|
|
|
- "cursorButton": "up",
|
|
|
- "cursorX": 0,
|
|
|
- "cursorY": 0,
|
|
|
- "draggingElement": null,
|
|
|
- "editingElement": null,
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "elementLocked": false,
|
|
|
- "elementType": "selection",
|
|
|
- "errorMessage": null,
|
|
|
- "exportBackground": true,
|
|
|
- "exportEmbedScene": false,
|
|
|
- "fileHandle": null,
|
|
|
- "gridSize": null,
|
|
|
- "height": 768,
|
|
|
- "isBindingEnabled": true,
|
|
|
- "isLibraryOpen": false,
|
|
|
- "isLoading": false,
|
|
|
- "isResizing": false,
|
|
|
- "isRotating": false,
|
|
|
- "lastPointerDownWith": "mouse",
|
|
|
- "multiElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "offsetLeft": 0,
|
|
|
- "offsetTop": 0,
|
|
|
- "openMenu": null,
|
|
|
- "previousSelectedElementIds": Object {},
|
|
|
- "resizingElement": null,
|
|
|
- "scrollX": 0,
|
|
|
- "scrollY": 0,
|
|
|
- "scrolledOutside": false,
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id2": true,
|
|
|
- "id3": true,
|
|
|
- "id4": true,
|
|
|
- "id5": true,
|
|
|
- "id6": true,
|
|
|
- },
|
|
|
- "selectedGroupIds": Object {},
|
|
|
- "selectionElement": null,
|
|
|
- "shouldAddWatermark": false,
|
|
|
- "shouldCacheIgnoreZoom": false,
|
|
|
- "showShortcutsDialog": false,
|
|
|
- "startBoundElement": null,
|
|
|
- "suggestedBindings": Array [],
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- "width": 1024,
|
|
|
- "zenModeEnabled": false,
|
|
|
- "zoom": Object {
|
|
|
- "translation": Object {
|
|
|
- "x": 0,
|
|
|
- "y": 0,
|
|
|
- },
|
|
|
- "value": 1,
|
|
|
- },
|
|
|
-}
|
|
|
-`;
|
|
|
-
|
|
|
-exports[`regression tests resize an element, trying every resize handle: [unresize handle ne (-5, -5)] element 0 1`] = `
|
|
|
-Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 10,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 8,
|
|
|
- "versionNonce": 23633383,
|
|
|
- "width": 10,
|
|
|
- "x": 10,
|
|
|
- "y": 10,
|
|
|
-}
|
|
|
-`;
|
|
|
-
|
|
|
-exports[`regression tests resize an element, trying every resize handle: [unresize handle ne (-5, -5)] history 1`] = `
|
|
|
-Object {
|
|
|
- "recording": false,
|
|
|
- "redoStack": Array [],
|
|
|
- "stateHistory": Array [
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {},
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 10,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 2,
|
|
|
- "versionNonce": 1278240551,
|
|
|
- "width": 10,
|
|
|
- "x": 10,
|
|
|
- "y": 10,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 15,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 3,
|
|
|
- "versionNonce": 453191,
|
|
|
- "width": 15,
|
|
|
- "x": 5,
|
|
|
- "y": 5,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id2": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 10,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 4,
|
|
|
- "versionNonce": 2019559783,
|
|
|
- "width": 10,
|
|
|
- "x": 10,
|
|
|
- "y": 10,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id2": true,
|
|
|
- "id3": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 5,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 5,
|
|
|
- "versionNonce": 1116226695,
|
|
|
- "width": 5,
|
|
|
- "x": 15,
|
|
|
- "y": 15,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id2": true,
|
|
|
- "id3": true,
|
|
|
- "id4": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 10,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 6,
|
|
|
- "versionNonce": 238820263,
|
|
|
- "width": 10,
|
|
|
- "x": 10,
|
|
|
- "y": 10,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id2": true,
|
|
|
- "id3": true,
|
|
|
- "id4": true,
|
|
|
- "id5": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 15,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 7,
|
|
|
- "versionNonce": 1604849351,
|
|
|
- "width": 5,
|
|
|
- "x": 10,
|
|
|
- "y": 5,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id2": true,
|
|
|
- "id3": true,
|
|
|
- "id4": true,
|
|
|
- "id5": true,
|
|
|
- "id6": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 10,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 8,
|
|
|
- "versionNonce": 23633383,
|
|
|
- "width": 10,
|
|
|
- "x": 10,
|
|
|
- "y": 10,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- ],
|
|
|
-}
|
|
|
-`;
|
|
|
-
|
|
|
-exports[`regression tests resize an element, trying every resize handle: [unresize handle ne (-5, -5)] number of elements 1`] = `1`;
|
|
|
-
|
|
|
-exports[`regression tests resize an element, trying every resize handle: [unresize handle ne (-5, -5)] number of renders 1`] = `23`;
|
|
|
-
|
|
|
-exports[`regression tests resize an element, trying every resize handle: [unresize handle nw (+5, +5)] appState 1`] = `
|
|
|
-Object {
|
|
|
- "appearance": "light",
|
|
|
- "collaborators": Map {},
|
|
|
- "currentItemBackgroundColor": "transparent",
|
|
|
- "currentItemFillStyle": "hachure",
|
|
|
- "currentItemFontFamily": 1,
|
|
|
- "currentItemFontSize": 20,
|
|
|
- "currentItemLinearStrokeSharpness": "round",
|
|
|
- "currentItemOpacity": 100,
|
|
|
- "currentItemRoughness": 1,
|
|
|
- "currentItemStrokeColor": "#000000",
|
|
|
- "currentItemStrokeSharpness": "sharp",
|
|
|
- "currentItemStrokeStyle": "solid",
|
|
|
- "currentItemStrokeWidth": 1,
|
|
|
- "currentItemTextAlign": "left",
|
|
|
- "cursorButton": "up",
|
|
|
- "cursorX": 0,
|
|
|
- "cursorY": 0,
|
|
|
- "draggingElement": null,
|
|
|
- "editingElement": null,
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "elementLocked": false,
|
|
|
- "elementType": "selection",
|
|
|
- "errorMessage": null,
|
|
|
- "exportBackground": true,
|
|
|
- "exportEmbedScene": false,
|
|
|
- "fileHandle": null,
|
|
|
- "gridSize": null,
|
|
|
- "height": 768,
|
|
|
- "isBindingEnabled": true,
|
|
|
- "isLibraryOpen": false,
|
|
|
- "isLoading": false,
|
|
|
- "isResizing": false,
|
|
|
- "isRotating": false,
|
|
|
- "lastPointerDownWith": "mouse",
|
|
|
- "multiElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "offsetLeft": 0,
|
|
|
- "offsetTop": 0,
|
|
|
- "openMenu": null,
|
|
|
- "previousSelectedElementIds": Object {},
|
|
|
- "resizingElement": null,
|
|
|
- "scrollX": 0,
|
|
|
- "scrollY": 0,
|
|
|
- "scrolledOutside": false,
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id2": true,
|
|
|
- "id3": true,
|
|
|
- "id4": true,
|
|
|
- },
|
|
|
- "selectedGroupIds": Object {},
|
|
|
- "selectionElement": null,
|
|
|
- "shouldAddWatermark": false,
|
|
|
- "shouldCacheIgnoreZoom": false,
|
|
|
- "showShortcutsDialog": false,
|
|
|
- "startBoundElement": null,
|
|
|
- "suggestedBindings": Array [],
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- "width": 1024,
|
|
|
- "zenModeEnabled": false,
|
|
|
- "zoom": Object {
|
|
|
- "translation": Object {
|
|
|
- "x": 0,
|
|
|
- "y": 0,
|
|
|
- },
|
|
|
- "value": 1,
|
|
|
- },
|
|
|
-}
|
|
|
-`;
|
|
|
-
|
|
|
-exports[`regression tests resize an element, trying every resize handle: [unresize handle nw (+5, +5)] element 0 1`] = `
|
|
|
-Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 10,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 6,
|
|
|
- "versionNonce": 238820263,
|
|
|
- "width": 10,
|
|
|
- "x": 10,
|
|
|
- "y": 10,
|
|
|
-}
|
|
|
-`;
|
|
|
-
|
|
|
-exports[`regression tests resize an element, trying every resize handle: [unresize handle nw (+5, +5)] history 1`] = `
|
|
|
-Object {
|
|
|
- "recording": false,
|
|
|
- "redoStack": Array [],
|
|
|
- "stateHistory": Array [
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {},
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 10,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 2,
|
|
|
- "versionNonce": 1278240551,
|
|
|
- "width": 10,
|
|
|
- "x": 10,
|
|
|
- "y": 10,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 15,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 3,
|
|
|
- "versionNonce": 453191,
|
|
|
- "width": 15,
|
|
|
- "x": 5,
|
|
|
- "y": 5,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id2": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 10,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 4,
|
|
|
- "versionNonce": 2019559783,
|
|
|
- "width": 10,
|
|
|
- "x": 10,
|
|
|
- "y": 10,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id2": true,
|
|
|
- "id3": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 5,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 5,
|
|
|
- "versionNonce": 1116226695,
|
|
|
- "width": 5,
|
|
|
- "x": 15,
|
|
|
- "y": 15,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id2": true,
|
|
|
- "id3": true,
|
|
|
- "id4": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 10,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 6,
|
|
|
- "versionNonce": 238820263,
|
|
|
- "width": 10,
|
|
|
- "x": 10,
|
|
|
- "y": 10,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- ],
|
|
|
-}
|
|
|
-`;
|
|
|
-
|
|
|
-exports[`regression tests resize an element, trying every resize handle: [unresize handle nw (+5, +5)] number of elements 1`] = `1`;
|
|
|
-
|
|
|
-exports[`regression tests resize an element, trying every resize handle: [unresize handle nw (+5, +5)] number of renders 1`] = `17`;
|
|
|
-
|
|
|
-exports[`regression tests resize an element, trying every resize handle: [unresize handle nw (-5, -5)] appState 1`] = `
|
|
|
-Object {
|
|
|
- "appearance": "light",
|
|
|
- "collaborators": Map {},
|
|
|
- "currentItemBackgroundColor": "transparent",
|
|
|
- "currentItemFillStyle": "hachure",
|
|
|
- "currentItemFontFamily": 1,
|
|
|
- "currentItemFontSize": 20,
|
|
|
- "currentItemLinearStrokeSharpness": "round",
|
|
|
- "currentItemOpacity": 100,
|
|
|
- "currentItemRoughness": 1,
|
|
|
- "currentItemStrokeColor": "#000000",
|
|
|
- "currentItemStrokeSharpness": "sharp",
|
|
|
- "currentItemStrokeStyle": "solid",
|
|
|
- "currentItemStrokeWidth": 1,
|
|
|
- "currentItemTextAlign": "left",
|
|
|
- "cursorButton": "up",
|
|
|
- "cursorX": 0,
|
|
|
- "cursorY": 0,
|
|
|
- "draggingElement": null,
|
|
|
- "editingElement": null,
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "elementLocked": false,
|
|
|
- "elementType": "selection",
|
|
|
- "errorMessage": null,
|
|
|
- "exportBackground": true,
|
|
|
- "exportEmbedScene": false,
|
|
|
- "fileHandle": null,
|
|
|
- "gridSize": null,
|
|
|
- "height": 768,
|
|
|
- "isBindingEnabled": true,
|
|
|
- "isLibraryOpen": false,
|
|
|
- "isLoading": false,
|
|
|
- "isResizing": false,
|
|
|
- "isRotating": false,
|
|
|
- "lastPointerDownWith": "mouse",
|
|
|
- "multiElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "offsetLeft": 0,
|
|
|
- "offsetTop": 0,
|
|
|
- "openMenu": null,
|
|
|
- "previousSelectedElementIds": Object {},
|
|
|
- "resizingElement": null,
|
|
|
- "scrollX": 0,
|
|
|
- "scrollY": 0,
|
|
|
- "scrolledOutside": false,
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id2": true,
|
|
|
- },
|
|
|
- "selectedGroupIds": Object {},
|
|
|
- "selectionElement": null,
|
|
|
- "shouldAddWatermark": false,
|
|
|
- "shouldCacheIgnoreZoom": false,
|
|
|
- "showShortcutsDialog": false,
|
|
|
- "startBoundElement": null,
|
|
|
- "suggestedBindings": Array [],
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- "width": 1024,
|
|
|
- "zenModeEnabled": false,
|
|
|
- "zoom": Object {
|
|
|
- "translation": Object {
|
|
|
- "x": 0,
|
|
|
- "y": 0,
|
|
|
- },
|
|
|
- "value": 1,
|
|
|
- },
|
|
|
-}
|
|
|
-`;
|
|
|
-
|
|
|
-exports[`regression tests resize an element, trying every resize handle: [unresize handle nw (-5, -5)] element 0 1`] = `
|
|
|
-Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 10,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 4,
|
|
|
- "versionNonce": 2019559783,
|
|
|
- "width": 10,
|
|
|
- "x": 10,
|
|
|
- "y": 10,
|
|
|
-}
|
|
|
-`;
|
|
|
-
|
|
|
-exports[`regression tests resize an element, trying every resize handle: [unresize handle nw (-5, -5)] history 1`] = `
|
|
|
-Object {
|
|
|
- "recording": false,
|
|
|
- "redoStack": Array [],
|
|
|
- "stateHistory": Array [
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {},
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 10,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 2,
|
|
|
- "versionNonce": 1278240551,
|
|
|
- "width": 10,
|
|
|
- "x": 10,
|
|
|
- "y": 10,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 15,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 3,
|
|
|
- "versionNonce": 453191,
|
|
|
- "width": 15,
|
|
|
- "x": 5,
|
|
|
- "y": 5,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id2": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 10,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 4,
|
|
|
- "versionNonce": 2019559783,
|
|
|
- "width": 10,
|
|
|
- "x": 10,
|
|
|
- "y": 10,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- ],
|
|
|
-}
|
|
|
-`;
|
|
|
-
|
|
|
-exports[`regression tests resize an element, trying every resize handle: [unresize handle nw (-5, -5)] number of elements 1`] = `1`;
|
|
|
-
|
|
|
-exports[`regression tests resize an element, trying every resize handle: [unresize handle nw (-5, -5)] number of renders 1`] = `11`;
|
|
|
-
|
|
|
-exports[`regression tests resize an element, trying every resize handle: [unresize handle se (+5, +5)] appState 1`] = `
|
|
|
-Object {
|
|
|
- "appearance": "light",
|
|
|
- "collaborators": Map {},
|
|
|
- "currentItemBackgroundColor": "transparent",
|
|
|
- "currentItemFillStyle": "hachure",
|
|
|
- "currentItemFontFamily": 1,
|
|
|
- "currentItemFontSize": 20,
|
|
|
- "currentItemLinearStrokeSharpness": "round",
|
|
|
- "currentItemOpacity": 100,
|
|
|
- "currentItemRoughness": 1,
|
|
|
- "currentItemStrokeColor": "#000000",
|
|
|
- "currentItemStrokeSharpness": "sharp",
|
|
|
- "currentItemStrokeStyle": "solid",
|
|
|
- "currentItemStrokeWidth": 1,
|
|
|
- "currentItemTextAlign": "left",
|
|
|
- "cursorButton": "up",
|
|
|
- "cursorX": 0,
|
|
|
- "cursorY": 0,
|
|
|
- "draggingElement": null,
|
|
|
- "editingElement": null,
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "elementLocked": false,
|
|
|
- "elementType": "selection",
|
|
|
- "errorMessage": null,
|
|
|
- "exportBackground": true,
|
|
|
- "exportEmbedScene": false,
|
|
|
- "fileHandle": null,
|
|
|
- "gridSize": null,
|
|
|
- "height": 768,
|
|
|
- "isBindingEnabled": true,
|
|
|
- "isLibraryOpen": false,
|
|
|
- "isLoading": false,
|
|
|
- "isResizing": false,
|
|
|
- "isRotating": false,
|
|
|
- "lastPointerDownWith": "mouse",
|
|
|
- "multiElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "offsetLeft": 0,
|
|
|
- "offsetTop": 0,
|
|
|
- "openMenu": null,
|
|
|
- "previousSelectedElementIds": Object {},
|
|
|
- "resizingElement": null,
|
|
|
- "scrollX": 0,
|
|
|
- "scrollY": 0,
|
|
|
- "scrolledOutside": false,
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id10": true,
|
|
|
- "id11": true,
|
|
|
- "id12": true,
|
|
|
- "id13": true,
|
|
|
- "id14": true,
|
|
|
- "id15": true,
|
|
|
- "id16": true,
|
|
|
- "id2": true,
|
|
|
- "id3": true,
|
|
|
- "id4": true,
|
|
|
- "id5": true,
|
|
|
- "id6": true,
|
|
|
- "id7": true,
|
|
|
- "id8": true,
|
|
|
- "id9": true,
|
|
|
- },
|
|
|
- "selectedGroupIds": Object {},
|
|
|
- "selectionElement": null,
|
|
|
- "shouldAddWatermark": false,
|
|
|
- "shouldCacheIgnoreZoom": false,
|
|
|
- "showShortcutsDialog": false,
|
|
|
- "startBoundElement": null,
|
|
|
- "suggestedBindings": Array [],
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- "width": 1024,
|
|
|
- "zenModeEnabled": false,
|
|
|
- "zoom": Object {
|
|
|
- "translation": Object {
|
|
|
- "x": 0,
|
|
|
- "y": 0,
|
|
|
- },
|
|
|
- "value": 1,
|
|
|
- },
|
|
|
-}
|
|
|
-`;
|
|
|
-
|
|
|
-exports[`regression tests resize an element, trying every resize handle: [unresize handle se (+5, +5)] element 0 1`] = `
|
|
|
-Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 10,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 18,
|
|
|
- "versionNonce": 845789479,
|
|
|
- "width": 10,
|
|
|
- "x": 10,
|
|
|
- "y": 10,
|
|
|
-}
|
|
|
-`;
|
|
|
-
|
|
|
-exports[`regression tests resize an element, trying every resize handle: [unresize handle se (+5, +5)] history 1`] = `
|
|
|
-Object {
|
|
|
- "recording": false,
|
|
|
- "redoStack": Array [],
|
|
|
- "stateHistory": Array [
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {},
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 10,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 2,
|
|
|
- "versionNonce": 1278240551,
|
|
|
- "width": 10,
|
|
|
- "x": 10,
|
|
|
- "y": 10,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 15,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 3,
|
|
|
- "versionNonce": 453191,
|
|
|
- "width": 15,
|
|
|
- "x": 5,
|
|
|
- "y": 5,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id2": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 10,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 4,
|
|
|
- "versionNonce": 2019559783,
|
|
|
- "width": 10,
|
|
|
- "x": 10,
|
|
|
- "y": 10,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id2": true,
|
|
|
- "id3": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 5,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 5,
|
|
|
- "versionNonce": 1116226695,
|
|
|
- "width": 5,
|
|
|
- "x": 15,
|
|
|
- "y": 15,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id2": true,
|
|
|
- "id3": true,
|
|
|
- "id4": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 10,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 6,
|
|
|
- "versionNonce": 238820263,
|
|
|
- "width": 10,
|
|
|
- "x": 10,
|
|
|
- "y": 10,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id2": true,
|
|
|
- "id3": true,
|
|
|
- "id4": true,
|
|
|
- "id5": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 15,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 7,
|
|
|
- "versionNonce": 1604849351,
|
|
|
- "width": 5,
|
|
|
- "x": 10,
|
|
|
- "y": 5,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id2": true,
|
|
|
- "id3": true,
|
|
|
- "id4": true,
|
|
|
- "id5": true,
|
|
|
- "id6": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 10,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 8,
|
|
|
- "versionNonce": 23633383,
|
|
|
- "width": 10,
|
|
|
- "x": 10,
|
|
|
- "y": 10,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id2": true,
|
|
|
- "id3": true,
|
|
|
- "id4": true,
|
|
|
- "id5": true,
|
|
|
- "id6": true,
|
|
|
- "id7": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 5,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 9,
|
|
|
- "versionNonce": 915032327,
|
|
|
- "width": 15,
|
|
|
- "x": 10,
|
|
|
- "y": 15,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id2": true,
|
|
|
- "id3": true,
|
|
|
- "id4": true,
|
|
|
- "id5": true,
|
|
|
- "id6": true,
|
|
|
- "id7": true,
|
|
|
- "id8": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 10,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 10,
|
|
|
- "versionNonce": 747212839,
|
|
|
- "width": 10,
|
|
|
- "x": 10,
|
|
|
- "y": 10,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id2": true,
|
|
|
- "id3": true,
|
|
|
- "id4": true,
|
|
|
- "id5": true,
|
|
|
- "id6": true,
|
|
|
- "id7": true,
|
|
|
- "id8": true,
|
|
|
- "id9": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 5,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 11,
|
|
|
- "versionNonce": 760410951,
|
|
|
- "width": 15,
|
|
|
- "x": 5,
|
|
|
- "y": 10,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id10": true,
|
|
|
- "id2": true,
|
|
|
- "id3": true,
|
|
|
- "id4": true,
|
|
|
- "id5": true,
|
|
|
- "id6": true,
|
|
|
- "id7": true,
|
|
|
- "id8": true,
|
|
|
- "id9": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 10,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 12,
|
|
|
- "versionNonce": 289600103,
|
|
|
- "width": 10,
|
|
|
- "x": 10,
|
|
|
- "y": 10,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id10": true,
|
|
|
- "id11": true,
|
|
|
- "id2": true,
|
|
|
- "id3": true,
|
|
|
- "id4": true,
|
|
|
- "id5": true,
|
|
|
- "id6": true,
|
|
|
- "id7": true,
|
|
|
- "id8": true,
|
|
|
- "id9": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 15,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 13,
|
|
|
- "versionNonce": 1898319239,
|
|
|
- "width": 5,
|
|
|
- "x": 15,
|
|
|
- "y": 10,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id10": true,
|
|
|
- "id11": true,
|
|
|
- "id12": true,
|
|
|
- "id2": true,
|
|
|
- "id3": true,
|
|
|
- "id4": true,
|
|
|
- "id5": true,
|
|
|
- "id6": true,
|
|
|
- "id7": true,
|
|
|
- "id8": true,
|
|
|
- "id9": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 10,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 14,
|
|
|
- "versionNonce": 406373543,
|
|
|
- "width": 10,
|
|
|
- "x": 10,
|
|
|
- "y": 10,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id10": true,
|
|
|
- "id11": true,
|
|
|
- "id12": true,
|
|
|
- "id13": true,
|
|
|
- "id2": true,
|
|
|
- "id3": true,
|
|
|
- "id4": true,
|
|
|
- "id5": true,
|
|
|
- "id6": true,
|
|
|
- "id7": true,
|
|
|
- "id8": true,
|
|
|
- "id9": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 5,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 15,
|
|
|
- "versionNonce": 908564423,
|
|
|
- "width": 5,
|
|
|
- "x": 10,
|
|
|
- "y": 10,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id10": true,
|
|
|
- "id11": true,
|
|
|
- "id12": true,
|
|
|
- "id13": true,
|
|
|
- "id14": true,
|
|
|
- "id2": true,
|
|
|
- "id3": true,
|
|
|
- "id4": true,
|
|
|
- "id5": true,
|
|
|
- "id6": true,
|
|
|
- "id7": true,
|
|
|
- "id8": true,
|
|
|
- "id9": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 10,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 16,
|
|
|
- "versionNonce": 1359939303,
|
|
|
- "width": 10,
|
|
|
- "x": 10,
|
|
|
- "y": 10,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id10": true,
|
|
|
- "id11": true,
|
|
|
- "id12": true,
|
|
|
- "id13": true,
|
|
|
- "id14": true,
|
|
|
- "id15": true,
|
|
|
- "id2": true,
|
|
|
- "id3": true,
|
|
|
- "id4": true,
|
|
|
- "id5": true,
|
|
|
- "id6": true,
|
|
|
- "id7": true,
|
|
|
- "id8": true,
|
|
|
- "id9": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 15,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 17,
|
|
|
- "versionNonce": 2004587015,
|
|
|
- "width": 15,
|
|
|
- "x": 10,
|
|
|
- "y": 10,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id10": true,
|
|
|
- "id11": true,
|
|
|
- "id12": true,
|
|
|
- "id13": true,
|
|
|
- "id14": true,
|
|
|
- "id15": true,
|
|
|
- "id16": true,
|
|
|
- "id2": true,
|
|
|
- "id3": true,
|
|
|
- "id4": true,
|
|
|
- "id5": true,
|
|
|
- "id6": true,
|
|
|
- "id7": true,
|
|
|
- "id8": true,
|
|
|
- "id9": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 10,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 18,
|
|
|
- "versionNonce": 845789479,
|
|
|
- "width": 10,
|
|
|
- "x": 10,
|
|
|
- "y": 10,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- ],
|
|
|
-}
|
|
|
-`;
|
|
|
-
|
|
|
-exports[`regression tests resize an element, trying every resize handle: [unresize handle se (+5, +5)] number of elements 1`] = `1`;
|
|
|
-
|
|
|
-exports[`regression tests resize an element, trying every resize handle: [unresize handle se (+5, +5)] number of renders 1`] = `53`;
|
|
|
-
|
|
|
-exports[`regression tests resize an element, trying every resize handle: [unresize handle se (-5, -5)] appState 1`] = `
|
|
|
-Object {
|
|
|
- "appearance": "light",
|
|
|
- "collaborators": Map {},
|
|
|
- "currentItemBackgroundColor": "transparent",
|
|
|
- "currentItemFillStyle": "hachure",
|
|
|
- "currentItemFontFamily": 1,
|
|
|
- "currentItemFontSize": 20,
|
|
|
- "currentItemLinearStrokeSharpness": "round",
|
|
|
- "currentItemOpacity": 100,
|
|
|
- "currentItemRoughness": 1,
|
|
|
- "currentItemStrokeColor": "#000000",
|
|
|
- "currentItemStrokeSharpness": "sharp",
|
|
|
- "currentItemStrokeStyle": "solid",
|
|
|
- "currentItemStrokeWidth": 1,
|
|
|
- "currentItemTextAlign": "left",
|
|
|
- "cursorButton": "up",
|
|
|
- "cursorX": 0,
|
|
|
- "cursorY": 0,
|
|
|
- "draggingElement": null,
|
|
|
- "editingElement": null,
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "elementLocked": false,
|
|
|
- "elementType": "selection",
|
|
|
- "errorMessage": null,
|
|
|
- "exportBackground": true,
|
|
|
- "exportEmbedScene": false,
|
|
|
- "fileHandle": null,
|
|
|
- "gridSize": null,
|
|
|
- "height": 768,
|
|
|
- "isBindingEnabled": true,
|
|
|
- "isLibraryOpen": false,
|
|
|
- "isLoading": false,
|
|
|
- "isResizing": false,
|
|
|
- "isRotating": false,
|
|
|
- "lastPointerDownWith": "mouse",
|
|
|
- "multiElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "offsetLeft": 0,
|
|
|
- "offsetTop": 0,
|
|
|
- "openMenu": null,
|
|
|
- "previousSelectedElementIds": Object {},
|
|
|
- "resizingElement": null,
|
|
|
- "scrollX": 0,
|
|
|
- "scrollY": 0,
|
|
|
- "scrolledOutside": false,
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id10": true,
|
|
|
- "id11": true,
|
|
|
- "id12": true,
|
|
|
- "id13": true,
|
|
|
- "id14": true,
|
|
|
- "id2": true,
|
|
|
- "id3": true,
|
|
|
- "id4": true,
|
|
|
- "id5": true,
|
|
|
- "id6": true,
|
|
|
- "id7": true,
|
|
|
- "id8": true,
|
|
|
- "id9": true,
|
|
|
- },
|
|
|
- "selectedGroupIds": Object {},
|
|
|
- "selectionElement": null,
|
|
|
- "shouldAddWatermark": false,
|
|
|
- "shouldCacheIgnoreZoom": false,
|
|
|
- "showShortcutsDialog": false,
|
|
|
- "startBoundElement": null,
|
|
|
- "suggestedBindings": Array [],
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- "width": 1024,
|
|
|
- "zenModeEnabled": false,
|
|
|
- "zoom": Object {
|
|
|
- "translation": Object {
|
|
|
- "x": 0,
|
|
|
- "y": 0,
|
|
|
- },
|
|
|
- "value": 1,
|
|
|
- },
|
|
|
-}
|
|
|
-`;
|
|
|
-
|
|
|
-exports[`regression tests resize an element, trying every resize handle: [unresize handle se (-5, -5)] element 0 1`] = `
|
|
|
-Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 10,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 16,
|
|
|
- "versionNonce": 1359939303,
|
|
|
- "width": 10,
|
|
|
- "x": 10,
|
|
|
- "y": 10,
|
|
|
-}
|
|
|
-`;
|
|
|
-
|
|
|
-exports[`regression tests resize an element, trying every resize handle: [unresize handle se (-5, -5)] history 1`] = `
|
|
|
-Object {
|
|
|
- "recording": false,
|
|
|
- "redoStack": Array [],
|
|
|
- "stateHistory": Array [
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {},
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 10,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 2,
|
|
|
- "versionNonce": 1278240551,
|
|
|
- "width": 10,
|
|
|
- "x": 10,
|
|
|
- "y": 10,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 15,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 3,
|
|
|
- "versionNonce": 453191,
|
|
|
- "width": 15,
|
|
|
- "x": 5,
|
|
|
- "y": 5,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id2": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 10,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 4,
|
|
|
- "versionNonce": 2019559783,
|
|
|
- "width": 10,
|
|
|
- "x": 10,
|
|
|
- "y": 10,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id2": true,
|
|
|
- "id3": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 5,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 5,
|
|
|
- "versionNonce": 1116226695,
|
|
|
- "width": 5,
|
|
|
- "x": 15,
|
|
|
- "y": 15,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id2": true,
|
|
|
- "id3": true,
|
|
|
- "id4": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 10,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 6,
|
|
|
- "versionNonce": 238820263,
|
|
|
- "width": 10,
|
|
|
- "x": 10,
|
|
|
- "y": 10,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id2": true,
|
|
|
- "id3": true,
|
|
|
- "id4": true,
|
|
|
- "id5": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 15,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 7,
|
|
|
- "versionNonce": 1604849351,
|
|
|
- "width": 5,
|
|
|
- "x": 10,
|
|
|
- "y": 5,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id2": true,
|
|
|
- "id3": true,
|
|
|
- "id4": true,
|
|
|
- "id5": true,
|
|
|
- "id6": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 10,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 8,
|
|
|
- "versionNonce": 23633383,
|
|
|
- "width": 10,
|
|
|
- "x": 10,
|
|
|
- "y": 10,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id2": true,
|
|
|
- "id3": true,
|
|
|
- "id4": true,
|
|
|
- "id5": true,
|
|
|
- "id6": true,
|
|
|
- "id7": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 5,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 9,
|
|
|
- "versionNonce": 915032327,
|
|
|
- "width": 15,
|
|
|
- "x": 10,
|
|
|
- "y": 15,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id2": true,
|
|
|
- "id3": true,
|
|
|
- "id4": true,
|
|
|
- "id5": true,
|
|
|
- "id6": true,
|
|
|
- "id7": true,
|
|
|
- "id8": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 10,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 10,
|
|
|
- "versionNonce": 747212839,
|
|
|
- "width": 10,
|
|
|
- "x": 10,
|
|
|
- "y": 10,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id2": true,
|
|
|
- "id3": true,
|
|
|
- "id4": true,
|
|
|
- "id5": true,
|
|
|
- "id6": true,
|
|
|
- "id7": true,
|
|
|
- "id8": true,
|
|
|
- "id9": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 5,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 11,
|
|
|
- "versionNonce": 760410951,
|
|
|
- "width": 15,
|
|
|
- "x": 5,
|
|
|
- "y": 10,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id10": true,
|
|
|
- "id2": true,
|
|
|
- "id3": true,
|
|
|
- "id4": true,
|
|
|
- "id5": true,
|
|
|
- "id6": true,
|
|
|
- "id7": true,
|
|
|
- "id8": true,
|
|
|
- "id9": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 10,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 12,
|
|
|
- "versionNonce": 289600103,
|
|
|
- "width": 10,
|
|
|
- "x": 10,
|
|
|
- "y": 10,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id10": true,
|
|
|
- "id11": true,
|
|
|
- "id2": true,
|
|
|
- "id3": true,
|
|
|
- "id4": true,
|
|
|
- "id5": true,
|
|
|
- "id6": true,
|
|
|
- "id7": true,
|
|
|
- "id8": true,
|
|
|
- "id9": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 15,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 13,
|
|
|
- "versionNonce": 1898319239,
|
|
|
- "width": 5,
|
|
|
- "x": 15,
|
|
|
- "y": 10,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id10": true,
|
|
|
- "id11": true,
|
|
|
- "id12": true,
|
|
|
- "id2": true,
|
|
|
- "id3": true,
|
|
|
- "id4": true,
|
|
|
- "id5": true,
|
|
|
- "id6": true,
|
|
|
- "id7": true,
|
|
|
- "id8": true,
|
|
|
- "id9": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 10,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 14,
|
|
|
- "versionNonce": 406373543,
|
|
|
- "width": 10,
|
|
|
- "x": 10,
|
|
|
- "y": 10,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id10": true,
|
|
|
- "id11": true,
|
|
|
- "id12": true,
|
|
|
- "id13": true,
|
|
|
- "id2": true,
|
|
|
- "id3": true,
|
|
|
- "id4": true,
|
|
|
- "id5": true,
|
|
|
- "id6": true,
|
|
|
- "id7": true,
|
|
|
- "id8": true,
|
|
|
- "id9": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 5,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 15,
|
|
|
- "versionNonce": 908564423,
|
|
|
- "width": 5,
|
|
|
- "x": 10,
|
|
|
- "y": 10,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id10": true,
|
|
|
- "id11": true,
|
|
|
- "id12": true,
|
|
|
- "id13": true,
|
|
|
- "id14": true,
|
|
|
- "id2": true,
|
|
|
- "id3": true,
|
|
|
- "id4": true,
|
|
|
- "id5": true,
|
|
|
- "id6": true,
|
|
|
- "id7": true,
|
|
|
- "id8": true,
|
|
|
- "id9": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 10,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 16,
|
|
|
- "versionNonce": 1359939303,
|
|
|
- "width": 10,
|
|
|
- "x": 10,
|
|
|
- "y": 10,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- ],
|
|
|
-}
|
|
|
-`;
|
|
|
-
|
|
|
-exports[`regression tests resize an element, trying every resize handle: [unresize handle se (-5, -5)] number of elements 1`] = `1`;
|
|
|
-
|
|
|
-exports[`regression tests resize an element, trying every resize handle: [unresize handle se (-5, -5)] number of renders 1`] = `47`;
|
|
|
-
|
|
|
-exports[`regression tests resize an element, trying every resize handle: [unresize handle sw (+5, +5)] appState 1`] = `
|
|
|
-Object {
|
|
|
- "appearance": "light",
|
|
|
- "collaborators": Map {},
|
|
|
- "currentItemBackgroundColor": "transparent",
|
|
|
- "currentItemFillStyle": "hachure",
|
|
|
- "currentItemFontFamily": 1,
|
|
|
- "currentItemFontSize": 20,
|
|
|
- "currentItemLinearStrokeSharpness": "round",
|
|
|
- "currentItemOpacity": 100,
|
|
|
- "currentItemRoughness": 1,
|
|
|
- "currentItemStrokeColor": "#000000",
|
|
|
- "currentItemStrokeSharpness": "sharp",
|
|
|
- "currentItemStrokeStyle": "solid",
|
|
|
- "currentItemStrokeWidth": 1,
|
|
|
- "currentItemTextAlign": "left",
|
|
|
- "cursorButton": "up",
|
|
|
- "cursorX": 0,
|
|
|
- "cursorY": 0,
|
|
|
- "draggingElement": null,
|
|
|
- "editingElement": null,
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "elementLocked": false,
|
|
|
- "elementType": "selection",
|
|
|
- "errorMessage": null,
|
|
|
- "exportBackground": true,
|
|
|
- "exportEmbedScene": false,
|
|
|
- "fileHandle": null,
|
|
|
- "gridSize": null,
|
|
|
- "height": 768,
|
|
|
- "isBindingEnabled": true,
|
|
|
- "isLibraryOpen": false,
|
|
|
- "isLoading": false,
|
|
|
- "isResizing": false,
|
|
|
- "isRotating": false,
|
|
|
- "lastPointerDownWith": "mouse",
|
|
|
- "multiElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "offsetLeft": 0,
|
|
|
- "offsetTop": 0,
|
|
|
- "openMenu": null,
|
|
|
- "previousSelectedElementIds": Object {},
|
|
|
- "resizingElement": null,
|
|
|
- "scrollX": 0,
|
|
|
- "scrollY": 0,
|
|
|
- "scrolledOutside": false,
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id10": true,
|
|
|
- "id11": true,
|
|
|
- "id12": true,
|
|
|
- "id2": true,
|
|
|
- "id3": true,
|
|
|
- "id4": true,
|
|
|
- "id5": true,
|
|
|
- "id6": true,
|
|
|
- "id7": true,
|
|
|
- "id8": true,
|
|
|
- "id9": true,
|
|
|
- },
|
|
|
- "selectedGroupIds": Object {},
|
|
|
- "selectionElement": null,
|
|
|
- "shouldAddWatermark": false,
|
|
|
- "shouldCacheIgnoreZoom": false,
|
|
|
- "showShortcutsDialog": false,
|
|
|
- "startBoundElement": null,
|
|
|
- "suggestedBindings": Array [],
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- "width": 1024,
|
|
|
- "zenModeEnabled": false,
|
|
|
- "zoom": Object {
|
|
|
- "translation": Object {
|
|
|
- "x": 0,
|
|
|
- "y": 0,
|
|
|
- },
|
|
|
- "value": 1,
|
|
|
- },
|
|
|
-}
|
|
|
-`;
|
|
|
-
|
|
|
-exports[`regression tests resize an element, trying every resize handle: [unresize handle sw (+5, +5)] element 0 1`] = `
|
|
|
-Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 10,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 14,
|
|
|
- "versionNonce": 406373543,
|
|
|
- "width": 10,
|
|
|
- "x": 10,
|
|
|
- "y": 10,
|
|
|
-}
|
|
|
-`;
|
|
|
-
|
|
|
-exports[`regression tests resize an element, trying every resize handle: [unresize handle sw (+5, +5)] history 1`] = `
|
|
|
-Object {
|
|
|
- "recording": false,
|
|
|
- "redoStack": Array [],
|
|
|
- "stateHistory": Array [
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {},
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 10,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 2,
|
|
|
- "versionNonce": 1278240551,
|
|
|
- "width": 10,
|
|
|
- "x": 10,
|
|
|
- "y": 10,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 15,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 3,
|
|
|
- "versionNonce": 453191,
|
|
|
- "width": 15,
|
|
|
- "x": 5,
|
|
|
- "y": 5,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id2": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 10,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 4,
|
|
|
- "versionNonce": 2019559783,
|
|
|
- "width": 10,
|
|
|
- "x": 10,
|
|
|
- "y": 10,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id2": true,
|
|
|
- "id3": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 5,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 5,
|
|
|
- "versionNonce": 1116226695,
|
|
|
- "width": 5,
|
|
|
- "x": 15,
|
|
|
- "y": 15,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id2": true,
|
|
|
- "id3": true,
|
|
|
- "id4": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 10,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 6,
|
|
|
- "versionNonce": 238820263,
|
|
|
- "width": 10,
|
|
|
- "x": 10,
|
|
|
- "y": 10,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id2": true,
|
|
|
- "id3": true,
|
|
|
- "id4": true,
|
|
|
- "id5": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 15,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 7,
|
|
|
- "versionNonce": 1604849351,
|
|
|
- "width": 5,
|
|
|
- "x": 10,
|
|
|
- "y": 5,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id2": true,
|
|
|
- "id3": true,
|
|
|
- "id4": true,
|
|
|
- "id5": true,
|
|
|
- "id6": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 10,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 8,
|
|
|
- "versionNonce": 23633383,
|
|
|
- "width": 10,
|
|
|
- "x": 10,
|
|
|
- "y": 10,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id2": true,
|
|
|
- "id3": true,
|
|
|
- "id4": true,
|
|
|
- "id5": true,
|
|
|
- "id6": true,
|
|
|
- "id7": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 5,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 9,
|
|
|
- "versionNonce": 915032327,
|
|
|
- "width": 15,
|
|
|
- "x": 10,
|
|
|
- "y": 15,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id2": true,
|
|
|
- "id3": true,
|
|
|
- "id4": true,
|
|
|
- "id5": true,
|
|
|
- "id6": true,
|
|
|
- "id7": true,
|
|
|
- "id8": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 10,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 10,
|
|
|
- "versionNonce": 747212839,
|
|
|
- "width": 10,
|
|
|
- "x": 10,
|
|
|
- "y": 10,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id2": true,
|
|
|
- "id3": true,
|
|
|
- "id4": true,
|
|
|
- "id5": true,
|
|
|
- "id6": true,
|
|
|
- "id7": true,
|
|
|
- "id8": true,
|
|
|
- "id9": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 5,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 11,
|
|
|
- "versionNonce": 760410951,
|
|
|
- "width": 15,
|
|
|
- "x": 5,
|
|
|
- "y": 10,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id10": true,
|
|
|
- "id2": true,
|
|
|
- "id3": true,
|
|
|
- "id4": true,
|
|
|
- "id5": true,
|
|
|
- "id6": true,
|
|
|
- "id7": true,
|
|
|
- "id8": true,
|
|
|
- "id9": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 10,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 12,
|
|
|
- "versionNonce": 289600103,
|
|
|
- "width": 10,
|
|
|
- "x": 10,
|
|
|
- "y": 10,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id10": true,
|
|
|
- "id11": true,
|
|
|
- "id2": true,
|
|
|
- "id3": true,
|
|
|
- "id4": true,
|
|
|
- "id5": true,
|
|
|
- "id6": true,
|
|
|
- "id7": true,
|
|
|
- "id8": true,
|
|
|
- "id9": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 15,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 13,
|
|
|
- "versionNonce": 1898319239,
|
|
|
- "width": 5,
|
|
|
- "x": 15,
|
|
|
- "y": 10,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id10": true,
|
|
|
- "id11": true,
|
|
|
- "id12": true,
|
|
|
- "id2": true,
|
|
|
- "id3": true,
|
|
|
- "id4": true,
|
|
|
- "id5": true,
|
|
|
- "id6": true,
|
|
|
- "id7": true,
|
|
|
- "id8": true,
|
|
|
- "id9": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 10,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 14,
|
|
|
- "versionNonce": 406373543,
|
|
|
- "width": 10,
|
|
|
- "x": 10,
|
|
|
- "y": 10,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- ],
|
|
|
-}
|
|
|
-`;
|
|
|
-
|
|
|
-exports[`regression tests resize an element, trying every resize handle: [unresize handle sw (+5, +5)] number of elements 1`] = `1`;
|
|
|
-
|
|
|
-exports[`regression tests resize an element, trying every resize handle: [unresize handle sw (+5, +5)] number of renders 1`] = `41`;
|
|
|
-
|
|
|
-exports[`regression tests resize an element, trying every resize handle: [unresize handle sw (-5, -5)] appState 1`] = `
|
|
|
-Object {
|
|
|
- "appearance": "light",
|
|
|
- "collaborators": Map {},
|
|
|
- "currentItemBackgroundColor": "transparent",
|
|
|
- "currentItemFillStyle": "hachure",
|
|
|
- "currentItemFontFamily": 1,
|
|
|
- "currentItemFontSize": 20,
|
|
|
- "currentItemLinearStrokeSharpness": "round",
|
|
|
- "currentItemOpacity": 100,
|
|
|
- "currentItemRoughness": 1,
|
|
|
- "currentItemStrokeColor": "#000000",
|
|
|
- "currentItemStrokeSharpness": "sharp",
|
|
|
- "currentItemStrokeStyle": "solid",
|
|
|
- "currentItemStrokeWidth": 1,
|
|
|
- "currentItemTextAlign": "left",
|
|
|
- "cursorButton": "up",
|
|
|
- "cursorX": 0,
|
|
|
- "cursorY": 0,
|
|
|
- "draggingElement": null,
|
|
|
- "editingElement": null,
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "elementLocked": false,
|
|
|
- "elementType": "selection",
|
|
|
- "errorMessage": null,
|
|
|
- "exportBackground": true,
|
|
|
- "exportEmbedScene": false,
|
|
|
- "fileHandle": null,
|
|
|
- "gridSize": null,
|
|
|
- "height": 768,
|
|
|
- "isBindingEnabled": true,
|
|
|
- "isLibraryOpen": false,
|
|
|
- "isLoading": false,
|
|
|
- "isResizing": false,
|
|
|
- "isRotating": false,
|
|
|
- "lastPointerDownWith": "mouse",
|
|
|
- "multiElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "offsetLeft": 0,
|
|
|
- "offsetTop": 0,
|
|
|
- "openMenu": null,
|
|
|
- "previousSelectedElementIds": Object {},
|
|
|
- "resizingElement": null,
|
|
|
- "scrollX": 0,
|
|
|
- "scrollY": 0,
|
|
|
- "scrolledOutside": false,
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id10": true,
|
|
|
- "id2": true,
|
|
|
- "id3": true,
|
|
|
- "id4": true,
|
|
|
- "id5": true,
|
|
|
- "id6": true,
|
|
|
- "id7": true,
|
|
|
- "id8": true,
|
|
|
- "id9": true,
|
|
|
- },
|
|
|
- "selectedGroupIds": Object {},
|
|
|
- "selectionElement": null,
|
|
|
- "shouldAddWatermark": false,
|
|
|
- "shouldCacheIgnoreZoom": false,
|
|
|
- "showShortcutsDialog": false,
|
|
|
- "startBoundElement": null,
|
|
|
- "suggestedBindings": Array [],
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- "width": 1024,
|
|
|
- "zenModeEnabled": false,
|
|
|
- "zoom": Object {
|
|
|
- "translation": Object {
|
|
|
- "x": 0,
|
|
|
- "y": 0,
|
|
|
- },
|
|
|
- "value": 1,
|
|
|
- },
|
|
|
-}
|
|
|
-`;
|
|
|
-
|
|
|
-exports[`regression tests resize an element, trying every resize handle: [unresize handle sw (-5, -5)] element 0 1`] = `
|
|
|
-Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 10,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 12,
|
|
|
- "versionNonce": 289600103,
|
|
|
- "width": 10,
|
|
|
- "x": 10,
|
|
|
- "y": 10,
|
|
|
-}
|
|
|
-`;
|
|
|
-
|
|
|
-exports[`regression tests resize an element, trying every resize handle: [unresize handle sw (-5, -5)] history 1`] = `
|
|
|
-Object {
|
|
|
- "recording": false,
|
|
|
- "redoStack": Array [],
|
|
|
- "stateHistory": Array [
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {},
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 10,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 2,
|
|
|
- "versionNonce": 1278240551,
|
|
|
- "width": 10,
|
|
|
- "x": 10,
|
|
|
- "y": 10,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 15,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 3,
|
|
|
- "versionNonce": 453191,
|
|
|
- "width": 15,
|
|
|
- "x": 5,
|
|
|
- "y": 5,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id2": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 10,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 4,
|
|
|
- "versionNonce": 2019559783,
|
|
|
- "width": 10,
|
|
|
- "x": 10,
|
|
|
- "y": 10,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id2": true,
|
|
|
- "id3": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 5,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 5,
|
|
|
- "versionNonce": 1116226695,
|
|
|
- "width": 5,
|
|
|
- "x": 15,
|
|
|
- "y": 15,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id2": true,
|
|
|
- "id3": true,
|
|
|
- "id4": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 10,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 6,
|
|
|
- "versionNonce": 238820263,
|
|
|
- "width": 10,
|
|
|
- "x": 10,
|
|
|
- "y": 10,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id2": true,
|
|
|
- "id3": true,
|
|
|
- "id4": true,
|
|
|
- "id5": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 15,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 7,
|
|
|
- "versionNonce": 1604849351,
|
|
|
- "width": 5,
|
|
|
- "x": 10,
|
|
|
- "y": 5,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id2": true,
|
|
|
- "id3": true,
|
|
|
- "id4": true,
|
|
|
- "id5": true,
|
|
|
- "id6": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 10,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 8,
|
|
|
- "versionNonce": 23633383,
|
|
|
- "width": 10,
|
|
|
- "x": 10,
|
|
|
- "y": 10,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id2": true,
|
|
|
- "id3": true,
|
|
|
- "id4": true,
|
|
|
- "id5": true,
|
|
|
- "id6": true,
|
|
|
- "id7": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 5,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 9,
|
|
|
- "versionNonce": 915032327,
|
|
|
- "width": 15,
|
|
|
- "x": 10,
|
|
|
- "y": 15,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id2": true,
|
|
|
- "id3": true,
|
|
|
- "id4": true,
|
|
|
- "id5": true,
|
|
|
- "id6": true,
|
|
|
- "id7": true,
|
|
|
- "id8": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 10,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 10,
|
|
|
- "versionNonce": 747212839,
|
|
|
- "width": 10,
|
|
|
- "x": 10,
|
|
|
- "y": 10,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id2": true,
|
|
|
- "id3": true,
|
|
|
- "id4": true,
|
|
|
- "id5": true,
|
|
|
- "id6": true,
|
|
|
- "id7": true,
|
|
|
- "id8": true,
|
|
|
- "id9": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 5,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 11,
|
|
|
- "versionNonce": 760410951,
|
|
|
- "width": 15,
|
|
|
- "x": 5,
|
|
|
- "y": 10,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- Object {
|
|
|
- "appState": Object {
|
|
|
- "editingGroupId": null,
|
|
|
- "editingLinearElement": null,
|
|
|
- "name": "Untitled-201933152653",
|
|
|
- "selectedElementIds": Object {
|
|
|
- "id0": true,
|
|
|
- "id1": true,
|
|
|
- "id10": true,
|
|
|
- "id2": true,
|
|
|
- "id3": true,
|
|
|
- "id4": true,
|
|
|
- "id5": true,
|
|
|
- "id6": true,
|
|
|
- "id7": true,
|
|
|
- "id8": true,
|
|
|
- "id9": true,
|
|
|
- },
|
|
|
- "viewBackgroundColor": "#ffffff",
|
|
|
- },
|
|
|
- "elements": Array [
|
|
|
- Object {
|
|
|
- "angle": 0,
|
|
|
- "backgroundColor": "transparent",
|
|
|
- "boundElementIds": null,
|
|
|
- "fillStyle": "hachure",
|
|
|
- "groupIds": Array [],
|
|
|
- "height": 10,
|
|
|
- "id": "id0",
|
|
|
- "isDeleted": false,
|
|
|
- "opacity": 100,
|
|
|
- "roughness": 1,
|
|
|
- "seed": 337897,
|
|
|
- "strokeColor": "#000000",
|
|
|
- "strokeSharpness": "sharp",
|
|
|
- "strokeStyle": "solid",
|
|
|
- "strokeWidth": 1,
|
|
|
- "type": "rectangle",
|
|
|
- "version": 12,
|
|
|
- "versionNonce": 289600103,
|
|
|
- "width": 10,
|
|
|
- "x": 10,
|
|
|
- "y": 10,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- ],
|
|
|
-}
|
|
|
-`;
|
|
|
-
|
|
|
-exports[`regression tests resize an element, trying every resize handle: [unresize handle sw (-5, -5)] number of elements 1`] = `1`;
|
|
|
-
|
|
|
-exports[`regression tests resize an element, trying every resize handle: [unresize handle sw (-5, -5)] number of renders 1`] = `35`;
|
|
|
-
|
|
|
exports[`regression tests selecting 'Add to library' in context menu adds element to library: [end of test] appState 1`] = `
|
|
|
Object {
|
|
|
"appearance": "light",
|