|
@@ -0,0 +1,10762 @@
|
|
|
|
+// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
|
|
+
|
|
|
|
+exports[`regression tests alt-drag duplicates an element: [end of test] appState 1`] = `
|
|
|
|
+Object {
|
|
|
|
+ "collaborators": Map {},
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "cursorX": 0,
|
|
|
|
+ "cursorY": 0,
|
|
|
|
+ "draggingElement": null,
|
|
|
|
+ "editingElement": null,
|
|
|
|
+ "elementLocked": false,
|
|
|
|
+ "elementType": "selection",
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "isCollaborating": false,
|
|
|
|
+ "isResizing": false,
|
|
|
|
+ "lastPointerDownWith": "mouse",
|
|
|
|
+ "multiElement": null,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "openMenu": null,
|
|
|
|
+ "resizingElement": null,
|
|
|
|
+ "scrollX": 0,
|
|
|
|
+ "scrollY": 0,
|
|
|
|
+ "scrolledOutside": false,
|
|
|
|
+ "selectedElementIds": Object {
|
|
|
|
+ "id0": true,
|
|
|
|
+ "id2": true,
|
|
|
|
+ },
|
|
|
|
+ "selectionElement": null,
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ "zoom": 1,
|
|
|
|
+}
|
|
|
|
+`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests alt-drag duplicates an element: [end of test] element 0 1`] = `
|
|
|
|
+Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id1",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 453191,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 2,
|
|
|
|
+ "versionNonce": 1278240551,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+}
|
|
|
|
+`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests alt-drag duplicates an element: [end of test] element 1 1`] = `
|
|
|
|
+Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 3,
|
|
|
|
+ "versionNonce": 2019559783,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 20,
|
|
|
|
+ "y": 20,
|
|
|
|
+}
|
|
|
|
+`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests alt-drag duplicates an element: [end of test] history 1`] = `
|
|
|
|
+Object {
|
|
|
|
+ "recording": false,
|
|
|
|
+ "redoStack": Array [],
|
|
|
|
+ "stateHistory": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 3,
|
|
|
|
+ "versionNonce": 1278240551,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id1",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 453191,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 3,
|
|
|
|
+ "versionNonce": 1278240551,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 4,
|
|
|
|
+ "versionNonce": 2019559783,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 20,
|
|
|
|
+ "y": 20,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+}
|
|
|
|
+`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests alt-drag duplicates an element: [end of test] number of elements 1`] = `2`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests alt-drag duplicates an element: [end of test] number of renders 1`] = `8`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests arrow keys: [end of test] appState 1`] = `
|
|
|
|
+Object {
|
|
|
|
+ "collaborators": Map {},
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "cursorX": 0,
|
|
|
|
+ "cursorY": 0,
|
|
|
|
+ "draggingElement": null,
|
|
|
|
+ "editingElement": null,
|
|
|
|
+ "elementLocked": false,
|
|
|
|
+ "elementType": "selection",
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "isCollaborating": false,
|
|
|
|
+ "isResizing": false,
|
|
|
|
+ "lastPointerDownWith": "mouse",
|
|
|
|
+ "multiElement": null,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "openMenu": null,
|
|
|
|
+ "resizingElement": null,
|
|
|
|
+ "scrollX": 0,
|
|
|
|
+ "scrollY": 0,
|
|
|
|
+ "scrolledOutside": false,
|
|
|
|
+ "selectedElementIds": Object {
|
|
|
|
+ "id0": true,
|
|
|
|
+ },
|
|
|
|
+ "selectionElement": null,
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ "zoom": 1,
|
|
|
|
+}
|
|
|
|
+`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests arrow keys: [end of test] element 0 1`] = `
|
|
|
|
+Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 8,
|
|
|
|
+ "versionNonce": 1014066025,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 9,
|
|
|
|
+ "y": 9,
|
|
|
|
+}
|
|
|
|
+`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests arrow keys: [end of test] history 1`] = `
|
|
|
|
+Object {
|
|
|
|
+ "recording": false,
|
|
|
|
+ "redoStack": Array [],
|
|
|
|
+ "stateHistory": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 3,
|
|
|
|
+ "versionNonce": 1278240551,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+}
|
|
|
|
+`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests arrow keys: [end of test] number of elements 1`] = `1`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests arrow keys: [end of test] number of renders 1`] = `11`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests change the properties of a shape: [end of test] appState 1`] = `
|
|
|
|
+Object {
|
|
|
|
+ "collaborators": Map {},
|
|
|
|
+ "currentItemBackgroundColor": "#fa5252",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#5f3dc4",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "cursorX": 0,
|
|
|
|
+ "cursorY": 0,
|
|
|
|
+ "draggingElement": null,
|
|
|
|
+ "editingElement": null,
|
|
|
|
+ "elementLocked": false,
|
|
|
|
+ "elementType": "selection",
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "isCollaborating": false,
|
|
|
|
+ "isResizing": false,
|
|
|
|
+ "lastPointerDownWith": "mouse",
|
|
|
|
+ "multiElement": null,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "openMenu": null,
|
|
|
|
+ "resizingElement": null,
|
|
|
|
+ "scrollX": 0,
|
|
|
|
+ "scrollY": 0,
|
|
|
|
+ "scrolledOutside": false,
|
|
|
|
+ "selectedElementIds": Object {
|
|
|
|
+ "id0": true,
|
|
|
|
+ },
|
|
|
|
+ "selectionElement": null,
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ "zoom": 1,
|
|
|
|
+}
|
|
|
|
+`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests change the properties of a shape: [end of test] element 0 1`] = `
|
|
|
|
+Object {
|
|
|
|
+ "backgroundColor": "#fa5252",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#5f3dc4",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 6,
|
|
|
|
+ "versionNonce": 238820263,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+}
|
|
|
|
+`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests change the properties of a shape: [end of test] history 1`] = `
|
|
|
|
+Object {
|
|
|
|
+ "recording": false,
|
|
|
|
+ "redoStack": Array [],
|
|
|
|
+ "stateHistory": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 3,
|
|
|
|
+ "versionNonce": 1278240551,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 4,
|
|
|
|
+ "versionNonce": 453191,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "#fa5252",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "#fa5252",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 5,
|
|
|
|
+ "versionNonce": 2019559783,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "#fa5252",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "#fa5252",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 6,
|
|
|
|
+ "versionNonce": 1116226695,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "#fa5252",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#5f3dc4",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "#fa5252",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#5f3dc4",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 7,
|
|
|
|
+ "versionNonce": 238820263,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+}
|
|
|
|
+`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests change the properties of a shape: [end of test] number of elements 1`] = `1`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests change the properties of a shape: [end of test] number of renders 1`] = `9`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests click on an element and drag it: [dragged] appState 1`] = `
|
|
|
|
+Object {
|
|
|
|
+ "collaborators": Map {},
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "cursorX": 0,
|
|
|
|
+ "cursorY": 0,
|
|
|
|
+ "draggingElement": null,
|
|
|
|
+ "editingElement": null,
|
|
|
|
+ "elementLocked": false,
|
|
|
|
+ "elementType": "selection",
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "isCollaborating": false,
|
|
|
|
+ "isResizing": false,
|
|
|
|
+ "lastPointerDownWith": "mouse",
|
|
|
|
+ "multiElement": null,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "openMenu": null,
|
|
|
|
+ "resizingElement": null,
|
|
|
|
+ "scrollX": 0,
|
|
|
|
+ "scrollY": 0,
|
|
|
|
+ "scrolledOutside": false,
|
|
|
|
+ "selectedElementIds": Object {
|
|
|
|
+ "id0": true,
|
|
|
|
+ "id1": true,
|
|
|
|
+ },
|
|
|
|
+ "selectionElement": null,
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ "zoom": 1,
|
|
|
|
+}
|
|
|
|
+`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests click on an element and drag it: [dragged] element 0 1`] = `
|
|
|
|
+Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 3,
|
|
|
|
+ "versionNonce": 401146281,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 20,
|
|
|
|
+ "y": 20,
|
|
|
|
+}
|
|
|
|
+`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests click on an element and drag it: [dragged] history 1`] = `
|
|
|
|
+Object {
|
|
|
|
+ "recording": false,
|
|
|
|
+ "redoStack": Array [],
|
|
|
|
+ "stateHistory": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 3,
|
|
|
|
+ "versionNonce": 1278240551,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 4,
|
|
|
|
+ "versionNonce": 401146281,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 20,
|
|
|
|
+ "y": 20,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+}
|
|
|
|
+`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests click on an element and drag it: [dragged] number of elements 1`] = `1`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests click on an element and drag it: [dragged] number of renders 1`] = `8`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests click on an element and drag it: [end of test] appState 1`] = `
|
|
|
|
+Object {
|
|
|
|
+ "collaborators": Map {},
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "cursorX": 0,
|
|
|
|
+ "cursorY": 0,
|
|
|
|
+ "draggingElement": null,
|
|
|
|
+ "editingElement": null,
|
|
|
|
+ "elementLocked": false,
|
|
|
|
+ "elementType": "selection",
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "isCollaborating": false,
|
|
|
|
+ "isResizing": false,
|
|
|
|
+ "lastPointerDownWith": "mouse",
|
|
|
|
+ "multiElement": null,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "openMenu": null,
|
|
|
|
+ "resizingElement": null,
|
|
|
|
+ "scrollX": 0,
|
|
|
|
+ "scrollY": 0,
|
|
|
|
+ "scrolledOutside": false,
|
|
|
|
+ "selectedElementIds": Object {
|
|
|
|
+ "id0": true,
|
|
|
|
+ "id1": true,
|
|
|
|
+ "id2": true,
|
|
|
|
+ },
|
|
|
|
+ "selectionElement": null,
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ "zoom": 1,
|
|
|
|
+}
|
|
|
|
+`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests click on an element and drag it: [end of test] element 0 1`] = `
|
|
|
|
+Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 4,
|
|
|
|
+ "versionNonce": 1116226695,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+}
|
|
|
|
+`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests click on an element and drag it: [end of test] history 1`] = `
|
|
|
|
+Object {
|
|
|
|
+ "recording": false,
|
|
|
|
+ "redoStack": Array [],
|
|
|
|
+ "stateHistory": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 3,
|
|
|
|
+ "versionNonce": 1278240551,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 4,
|
|
|
|
+ "versionNonce": 401146281,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 20,
|
|
|
|
+ "y": 20,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 5,
|
|
|
|
+ "versionNonce": 1116226695,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+}
|
|
|
|
+`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests click on an element and drag it: [end of test] number of elements 1`] = `1`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests click on an element and drag it: [end of test] number of renders 1`] = `11`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests click to select a shape: [end of test] appState 1`] = `
|
|
|
|
+Object {
|
|
|
|
+ "collaborators": Map {},
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "cursorX": 0,
|
|
|
|
+ "cursorY": 0,
|
|
|
|
+ "draggingElement": null,
|
|
|
|
+ "editingElement": null,
|
|
|
|
+ "elementLocked": false,
|
|
|
|
+ "elementType": "selection",
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "isCollaborating": false,
|
|
|
|
+ "isResizing": false,
|
|
|
|
+ "lastPointerDownWith": "mouse",
|
|
|
|
+ "multiElement": null,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "openMenu": null,
|
|
|
|
+ "resizingElement": null,
|
|
|
|
+ "scrollX": 0,
|
|
|
|
+ "scrollY": 0,
|
|
|
|
+ "scrolledOutside": false,
|
|
|
|
+ "selectedElementIds": Object {
|
|
|
|
+ "id0": true,
|
|
|
|
+ "id2": true,
|
|
|
|
+ },
|
|
|
|
+ "selectionElement": null,
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ "zoom": 1,
|
|
|
|
+}
|
|
|
|
+`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests click to select a shape: [end of test] element 0 1`] = `
|
|
|
|
+Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 2,
|
|
|
|
+ "versionNonce": 1278240551,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+}
|
|
|
|
+`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests click to select a shape: [end of test] element 1 1`] = `
|
|
|
|
+Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id1",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 453191,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 2,
|
|
|
|
+ "versionNonce": 401146281,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 30,
|
|
|
|
+ "y": 10,
|
|
|
|
+}
|
|
|
|
+`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests click to select a shape: [end of test] history 1`] = `
|
|
|
|
+Object {
|
|
|
|
+ "recording": false,
|
|
|
|
+ "redoStack": Array [],
|
|
|
|
+ "stateHistory": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 3,
|
|
|
|
+ "versionNonce": 1278240551,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 3,
|
|
|
|
+ "versionNonce": 1278240551,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id1",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 453191,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 3,
|
|
|
|
+ "versionNonce": 401146281,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 30,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+}
|
|
|
|
+`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests click to select a shape: [end of test] number of elements 1`] = `2`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests click to select a shape: [end of test] number of renders 1`] = `11`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests click-drag to select a group: [end of test] appState 1`] = `
|
|
|
|
+Object {
|
|
|
|
+ "collaborators": Map {},
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "cursorX": 0,
|
|
|
|
+ "cursorY": 0,
|
|
|
|
+ "draggingElement": null,
|
|
|
|
+ "editingElement": null,
|
|
|
|
+ "elementLocked": false,
|
|
|
|
+ "elementType": "selection",
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "isCollaborating": false,
|
|
|
|
+ "isResizing": false,
|
|
|
|
+ "lastPointerDownWith": "mouse",
|
|
|
|
+ "multiElement": null,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "openMenu": null,
|
|
|
|
+ "resizingElement": null,
|
|
|
|
+ "scrollX": 0,
|
|
|
|
+ "scrollY": 0,
|
|
|
|
+ "scrolledOutside": false,
|
|
|
|
+ "selectedElementIds": Object {
|
|
|
|
+ "id0": true,
|
|
|
|
+ "id1": true,
|
|
|
|
+ "id3": true,
|
|
|
|
+ },
|
|
|
|
+ "selectionElement": null,
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ "zoom": 1,
|
|
|
|
+}
|
|
|
|
+`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests click-drag to select a group: [end of test] element 0 1`] = `
|
|
|
|
+Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 2,
|
|
|
|
+ "versionNonce": 1278240551,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+}
|
|
|
|
+`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests click-drag to select a group: [end of test] element 1 1`] = `
|
|
|
|
+Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id1",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 453191,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 2,
|
|
|
|
+ "versionNonce": 401146281,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 30,
|
|
|
|
+ "y": 10,
|
|
|
|
+}
|
|
|
|
+`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests click-drag to select a group: [end of test] element 2 1`] = `
|
|
|
|
+Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id2",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 1116226695,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 2,
|
|
|
|
+ "versionNonce": 1014066025,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 50,
|
|
|
|
+ "y": 10,
|
|
|
|
+}
|
|
|
|
+`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests click-drag to select a group: [end of test] history 1`] = `
|
|
|
|
+Object {
|
|
|
|
+ "recording": false,
|
|
|
|
+ "redoStack": Array [],
|
|
|
|
+ "stateHistory": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 3,
|
|
|
|
+ "versionNonce": 1278240551,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 3,
|
|
|
|
+ "versionNonce": 1278240551,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id1",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 453191,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 3,
|
|
|
|
+ "versionNonce": 401146281,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 30,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 3,
|
|
|
|
+ "versionNonce": 1278240551,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id1",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 453191,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 3,
|
|
|
|
+ "versionNonce": 401146281,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 30,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id2",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 1116226695,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 3,
|
|
|
|
+ "versionNonce": 1014066025,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 50,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+}
|
|
|
|
+`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests click-drag to select a group: [end of test] number of elements 1`] = `3`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests click-drag to select a group: [end of test] number of renders 1`] = `16`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests draw every type of shape: [end of test] appState 1`] = `
|
|
|
|
+Object {
|
|
|
|
+ "collaborators": Map {},
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "cursorX": 0,
|
|
|
|
+ "cursorY": 0,
|
|
|
|
+ "draggingElement": null,
|
|
|
|
+ "editingElement": null,
|
|
|
|
+ "elementLocked": false,
|
|
|
|
+ "elementType": "selection",
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "isCollaborating": false,
|
|
|
|
+ "isResizing": false,
|
|
|
|
+ "lastPointerDownWith": "mouse",
|
|
|
|
+ "multiElement": null,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "openMenu": null,
|
|
|
|
+ "resizingElement": null,
|
|
|
|
+ "scrollX": 0,
|
|
|
|
+ "scrollY": 0,
|
|
|
|
+ "scrolledOutside": false,
|
|
|
|
+ "selectedElementIds": Object {},
|
|
|
|
+ "selectionElement": null,
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ "zoom": 1,
|
|
|
|
+}
|
|
|
|
+`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests draw every type of shape: [end of test] element 0 1`] = `
|
|
|
|
+Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 2,
|
|
|
|
+ "versionNonce": 1278240551,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+}
|
|
|
|
+`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests draw every type of shape: [end of test] element 1 1`] = `
|
|
|
|
+Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id1",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 453191,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "diamond",
|
|
|
|
+ "version": 2,
|
|
|
|
+ "versionNonce": 401146281,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 30,
|
|
|
|
+ "y": 10,
|
|
|
|
+}
|
|
|
|
+`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests draw every type of shape: [end of test] element 2 1`] = `
|
|
|
|
+Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id2",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 1116226695,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "ellipse",
|
|
|
|
+ "version": 2,
|
|
|
|
+ "versionNonce": 1014066025,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 50,
|
|
|
|
+ "y": 10,
|
|
|
|
+}
|
|
|
|
+`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests draw every type of shape: [end of test] element 3 1`] = `
|
|
|
|
+Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id3",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "lastCommittedPoint": null,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "points": Array [
|
|
|
|
+ Array [
|
|
|
|
+ 0,
|
|
|
|
+ 0,
|
|
|
|
+ ],
|
|
|
|
+ Array [
|
|
|
|
+ 10,
|
|
|
|
+ 10,
|
|
|
|
+ ],
|
|
|
|
+ ],
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 1505387817,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "arrow",
|
|
|
|
+ "version": 3,
|
|
|
|
+ "versionNonce": 493213705,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 70,
|
|
|
|
+ "y": 10,
|
|
|
|
+}
|
|
|
|
+`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests draw every type of shape: [end of test] element 4 1`] = `
|
|
|
|
+Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id4",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "lastCommittedPoint": null,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "points": Array [
|
|
|
|
+ Array [
|
|
|
|
+ 0,
|
|
|
|
+ 0,
|
|
|
|
+ ],
|
|
|
|
+ Array [
|
|
|
|
+ 10,
|
|
|
|
+ 10,
|
|
|
|
+ ],
|
|
|
|
+ ],
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 760410951,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "line",
|
|
|
|
+ "version": 3,
|
|
|
|
+ "versionNonce": 289600103,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 90,
|
|
|
|
+ "y": 10,
|
|
|
|
+}
|
|
|
|
+`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests draw every type of shape: [end of test] history 1`] = `
|
|
|
|
+Object {
|
|
|
|
+ "recording": false,
|
|
|
|
+ "redoStack": Array [],
|
|
|
|
+ "stateHistory": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 3,
|
|
|
|
+ "versionNonce": 1278240551,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 3,
|
|
|
|
+ "versionNonce": 1278240551,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id1",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 453191,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "diamond",
|
|
|
|
+ "version": 3,
|
|
|
|
+ "versionNonce": 401146281,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 30,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 3,
|
|
|
|
+ "versionNonce": 1278240551,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id1",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 453191,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "diamond",
|
|
|
|
+ "version": 3,
|
|
|
|
+ "versionNonce": 401146281,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 30,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id2",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 1116226695,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "ellipse",
|
|
|
|
+ "version": 3,
|
|
|
|
+ "versionNonce": 1014066025,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 50,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 3,
|
|
|
|
+ "versionNonce": 1278240551,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id1",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 453191,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "diamond",
|
|
|
|
+ "version": 3,
|
|
|
|
+ "versionNonce": 401146281,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 30,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id2",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 1116226695,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "ellipse",
|
|
|
|
+ "version": 3,
|
|
|
|
+ "versionNonce": 1014066025,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 50,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id3",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "lastCommittedPoint": null,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "points": Array [
|
|
|
|
+ Array [
|
|
|
|
+ 0,
|
|
|
|
+ 0,
|
|
|
|
+ ],
|
|
|
|
+ Array [
|
|
|
|
+ 10,
|
|
|
|
+ 10,
|
|
|
|
+ ],
|
|
|
|
+ ],
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 1505387817,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "arrow",
|
|
|
|
+ "version": 4,
|
|
|
|
+ "versionNonce": 493213705,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 70,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 3,
|
|
|
|
+ "versionNonce": 1278240551,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id1",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 453191,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "diamond",
|
|
|
|
+ "version": 3,
|
|
|
|
+ "versionNonce": 401146281,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 30,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id2",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 1116226695,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "ellipse",
|
|
|
|
+ "version": 3,
|
|
|
|
+ "versionNonce": 1014066025,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 50,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id3",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "lastCommittedPoint": null,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "points": Array [
|
|
|
|
+ Array [
|
|
|
|
+ 0,
|
|
|
|
+ 0,
|
|
|
|
+ ],
|
|
|
|
+ Array [
|
|
|
|
+ 10,
|
|
|
|
+ 10,
|
|
|
|
+ ],
|
|
|
|
+ ],
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 1505387817,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "arrow",
|
|
|
|
+ "version": 4,
|
|
|
|
+ "versionNonce": 493213705,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 70,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id4",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "lastCommittedPoint": null,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "points": Array [
|
|
|
|
+ Array [
|
|
|
|
+ 0,
|
|
|
|
+ 0,
|
|
|
|
+ ],
|
|
|
|
+ Array [
|
|
|
|
+ 10,
|
|
|
|
+ 10,
|
|
|
|
+ ],
|
|
|
|
+ ],
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 760410951,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "line",
|
|
|
|
+ "version": 4,
|
|
|
|
+ "versionNonce": 289600103,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 90,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+}
|
|
|
|
+`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests draw every type of shape: [end of test] number of elements 1`] = `5`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests draw every type of shape: [end of test] number of renders 1`] = `33`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests hotkey 2 selects rectangle tool: [end of test] appState 1`] = `
|
|
|
|
+Object {
|
|
|
|
+ "collaborators": Map {},
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "cursorX": 0,
|
|
|
|
+ "cursorY": 0,
|
|
|
|
+ "draggingElement": null,
|
|
|
|
+ "editingElement": null,
|
|
|
|
+ "elementLocked": false,
|
|
|
|
+ "elementType": "selection",
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "isCollaborating": false,
|
|
|
|
+ "isResizing": false,
|
|
|
|
+ "lastPointerDownWith": "mouse",
|
|
|
|
+ "multiElement": null,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "openMenu": null,
|
|
|
|
+ "resizingElement": null,
|
|
|
|
+ "scrollX": 0,
|
|
|
|
+ "scrollY": 0,
|
|
|
|
+ "scrolledOutside": false,
|
|
|
|
+ "selectedElementIds": Object {
|
|
|
|
+ "id0": true,
|
|
|
|
+ },
|
|
|
|
+ "selectionElement": null,
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ "zoom": 1,
|
|
|
|
+}
|
|
|
|
+`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests hotkey 2 selects rectangle tool: [end of test] element 0 1`] = `
|
|
|
|
+Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 2,
|
|
|
|
+ "versionNonce": 1278240551,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+}
|
|
|
|
+`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests hotkey 2 selects rectangle tool: [end of test] history 1`] = `
|
|
|
|
+Object {
|
|
|
|
+ "recording": false,
|
|
|
|
+ "redoStack": Array [],
|
|
|
|
+ "stateHistory": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 3,
|
|
|
|
+ "versionNonce": 1278240551,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+}
|
|
|
|
+`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests hotkey 2 selects rectangle tool: [end of test] number of elements 1`] = `1`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests hotkey 2 selects rectangle tool: [end of test] number of renders 1`] = `5`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests hotkey 3 selects diamond tool: [end of test] appState 1`] = `
|
|
|
|
+Object {
|
|
|
|
+ "collaborators": Map {},
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "cursorX": 0,
|
|
|
|
+ "cursorY": 0,
|
|
|
|
+ "draggingElement": null,
|
|
|
|
+ "editingElement": null,
|
|
|
|
+ "elementLocked": false,
|
|
|
|
+ "elementType": "selection",
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "isCollaborating": false,
|
|
|
|
+ "isResizing": false,
|
|
|
|
+ "lastPointerDownWith": "mouse",
|
|
|
|
+ "multiElement": null,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "openMenu": null,
|
|
|
|
+ "resizingElement": null,
|
|
|
|
+ "scrollX": 0,
|
|
|
|
+ "scrollY": 0,
|
|
|
|
+ "scrolledOutside": false,
|
|
|
|
+ "selectedElementIds": Object {
|
|
|
|
+ "id0": true,
|
|
|
|
+ },
|
|
|
|
+ "selectionElement": null,
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ "zoom": 1,
|
|
|
|
+}
|
|
|
|
+`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests hotkey 3 selects diamond tool: [end of test] element 0 1`] = `
|
|
|
|
+Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "diamond",
|
|
|
|
+ "version": 2,
|
|
|
|
+ "versionNonce": 1278240551,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+}
|
|
|
|
+`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests hotkey 3 selects diamond tool: [end of test] history 1`] = `
|
|
|
|
+Object {
|
|
|
|
+ "recording": false,
|
|
|
|
+ "redoStack": Array [],
|
|
|
|
+ "stateHistory": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "diamond",
|
|
|
|
+ "version": 3,
|
|
|
|
+ "versionNonce": 1278240551,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+}
|
|
|
|
+`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests hotkey 3 selects diamond tool: [end of test] number of elements 1`] = `1`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests hotkey 3 selects diamond tool: [end of test] number of renders 1`] = `5`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests hotkey 4 selects ellipse tool: [end of test] appState 1`] = `
|
|
|
|
+Object {
|
|
|
|
+ "collaborators": Map {},
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "cursorX": 0,
|
|
|
|
+ "cursorY": 0,
|
|
|
|
+ "draggingElement": null,
|
|
|
|
+ "editingElement": null,
|
|
|
|
+ "elementLocked": false,
|
|
|
|
+ "elementType": "selection",
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "isCollaborating": false,
|
|
|
|
+ "isResizing": false,
|
|
|
|
+ "lastPointerDownWith": "mouse",
|
|
|
|
+ "multiElement": null,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "openMenu": null,
|
|
|
|
+ "resizingElement": null,
|
|
|
|
+ "scrollX": 0,
|
|
|
|
+ "scrollY": 0,
|
|
|
|
+ "scrolledOutside": false,
|
|
|
|
+ "selectedElementIds": Object {
|
|
|
|
+ "id0": true,
|
|
|
|
+ },
|
|
|
|
+ "selectionElement": null,
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ "zoom": 1,
|
|
|
|
+}
|
|
|
|
+`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests hotkey 4 selects ellipse tool: [end of test] element 0 1`] = `
|
|
|
|
+Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "ellipse",
|
|
|
|
+ "version": 2,
|
|
|
|
+ "versionNonce": 1278240551,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+}
|
|
|
|
+`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests hotkey 4 selects ellipse tool: [end of test] history 1`] = `
|
|
|
|
+Object {
|
|
|
|
+ "recording": false,
|
|
|
|
+ "redoStack": Array [],
|
|
|
|
+ "stateHistory": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "ellipse",
|
|
|
|
+ "version": 3,
|
|
|
|
+ "versionNonce": 1278240551,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+}
|
|
|
|
+`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests hotkey 4 selects ellipse tool: [end of test] number of elements 1`] = `1`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests hotkey 4 selects ellipse tool: [end of test] number of renders 1`] = `5`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests hotkey 5 selects arrow tool: [end of test] appState 1`] = `
|
|
|
|
+Object {
|
|
|
|
+ "collaborators": Map {},
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "cursorX": 0,
|
|
|
|
+ "cursorY": 0,
|
|
|
|
+ "draggingElement": null,
|
|
|
|
+ "editingElement": null,
|
|
|
|
+ "elementLocked": false,
|
|
|
|
+ "elementType": "selection",
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "isCollaborating": false,
|
|
|
|
+ "isResizing": false,
|
|
|
|
+ "lastPointerDownWith": "mouse",
|
|
|
|
+ "multiElement": null,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "openMenu": null,
|
|
|
|
+ "resizingElement": null,
|
|
|
|
+ "scrollX": 0,
|
|
|
|
+ "scrollY": 0,
|
|
|
|
+ "scrolledOutside": false,
|
|
|
|
+ "selectedElementIds": Object {
|
|
|
|
+ "id0": true,
|
|
|
|
+ },
|
|
|
|
+ "selectionElement": null,
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ "zoom": 1,
|
|
|
|
+}
|
|
|
|
+`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests hotkey 5 selects arrow tool: [end of test] element 0 1`] = `
|
|
|
|
+Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "lastCommittedPoint": null,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "points": Array [
|
|
|
|
+ Array [
|
|
|
|
+ 0,
|
|
|
|
+ 0,
|
|
|
|
+ ],
|
|
|
|
+ Array [
|
|
|
|
+ 10,
|
|
|
|
+ 10,
|
|
|
|
+ ],
|
|
|
|
+ ],
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "arrow",
|
|
|
|
+ "version": 3,
|
|
|
|
+ "versionNonce": 449462985,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+}
|
|
|
|
+`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests hotkey 5 selects arrow tool: [end of test] history 1`] = `
|
|
|
|
+Object {
|
|
|
|
+ "recording": false,
|
|
|
|
+ "redoStack": Array [],
|
|
|
|
+ "stateHistory": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "lastCommittedPoint": null,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "points": Array [
|
|
|
|
+ Array [
|
|
|
|
+ 0,
|
|
|
|
+ 0,
|
|
|
|
+ ],
|
|
|
|
+ Array [
|
|
|
|
+ 10,
|
|
|
|
+ 10,
|
|
|
|
+ ],
|
|
|
|
+ ],
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "arrow",
|
|
|
|
+ "version": 4,
|
|
|
|
+ "versionNonce": 449462985,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+}
|
|
|
|
+`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests hotkey 5 selects arrow tool: [end of test] number of elements 1`] = `1`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests hotkey 5 selects arrow tool: [end of test] number of renders 1`] = `5`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests hotkey 6 selects line tool: [end of test] appState 1`] = `
|
|
|
|
+Object {
|
|
|
|
+ "collaborators": Map {},
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "cursorX": 0,
|
|
|
|
+ "cursorY": 0,
|
|
|
|
+ "draggingElement": null,
|
|
|
|
+ "editingElement": null,
|
|
|
|
+ "elementLocked": false,
|
|
|
|
+ "elementType": "selection",
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "isCollaborating": false,
|
|
|
|
+ "isResizing": false,
|
|
|
|
+ "lastPointerDownWith": "mouse",
|
|
|
|
+ "multiElement": null,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "openMenu": null,
|
|
|
|
+ "resizingElement": null,
|
|
|
|
+ "scrollX": 0,
|
|
|
|
+ "scrollY": 0,
|
|
|
|
+ "scrolledOutside": false,
|
|
|
|
+ "selectedElementIds": Object {
|
|
|
|
+ "id0": true,
|
|
|
|
+ },
|
|
|
|
+ "selectionElement": null,
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ "zoom": 1,
|
|
|
|
+}
|
|
|
|
+`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests hotkey 6 selects line tool: [end of test] element 0 1`] = `
|
|
|
|
+Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "lastCommittedPoint": null,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "points": Array [
|
|
|
|
+ Array [
|
|
|
|
+ 0,
|
|
|
|
+ 0,
|
|
|
|
+ ],
|
|
|
|
+ Array [
|
|
|
|
+ 10,
|
|
|
|
+ 10,
|
|
|
|
+ ],
|
|
|
|
+ ],
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "line",
|
|
|
|
+ "version": 3,
|
|
|
|
+ "versionNonce": 449462985,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+}
|
|
|
|
+`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests hotkey 6 selects line tool: [end of test] history 1`] = `
|
|
|
|
+Object {
|
|
|
|
+ "recording": false,
|
|
|
|
+ "redoStack": Array [],
|
|
|
|
+ "stateHistory": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "lastCommittedPoint": null,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "points": Array [
|
|
|
|
+ Array [
|
|
|
|
+ 0,
|
|
|
|
+ 0,
|
|
|
|
+ ],
|
|
|
|
+ Array [
|
|
|
|
+ 10,
|
|
|
|
+ 10,
|
|
|
|
+ ],
|
|
|
|
+ ],
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "line",
|
|
|
|
+ "version": 4,
|
|
|
|
+ "versionNonce": 449462985,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+}
|
|
|
|
+`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests hotkey 6 selects line tool: [end of test] number of elements 1`] = `1`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests hotkey 6 selects line tool: [end of test] number of renders 1`] = `5`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests hotkey a selects arrow tool: [end of test] appState 1`] = `
|
|
|
|
+Object {
|
|
|
|
+ "collaborators": Map {},
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "cursorX": 0,
|
|
|
|
+ "cursorY": 0,
|
|
|
|
+ "draggingElement": null,
|
|
|
|
+ "editingElement": null,
|
|
|
|
+ "elementLocked": false,
|
|
|
|
+ "elementType": "selection",
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "isCollaborating": false,
|
|
|
|
+ "isResizing": false,
|
|
|
|
+ "lastPointerDownWith": "mouse",
|
|
|
|
+ "multiElement": null,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "openMenu": null,
|
|
|
|
+ "resizingElement": null,
|
|
|
|
+ "scrollX": 0,
|
|
|
|
+ "scrollY": 0,
|
|
|
|
+ "scrolledOutside": false,
|
|
|
|
+ "selectedElementIds": Object {
|
|
|
|
+ "id0": true,
|
|
|
|
+ },
|
|
|
|
+ "selectionElement": null,
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ "zoom": 1,
|
|
|
|
+}
|
|
|
|
+`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests hotkey a selects arrow tool: [end of test] element 0 1`] = `
|
|
|
|
+Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "lastCommittedPoint": null,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "points": Array [
|
|
|
|
+ Array [
|
|
|
|
+ 0,
|
|
|
|
+ 0,
|
|
|
|
+ ],
|
|
|
|
+ Array [
|
|
|
|
+ 10,
|
|
|
|
+ 10,
|
|
|
|
+ ],
|
|
|
|
+ ],
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "arrow",
|
|
|
|
+ "version": 3,
|
|
|
|
+ "versionNonce": 449462985,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+}
|
|
|
|
+`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests hotkey a selects arrow tool: [end of test] history 1`] = `
|
|
|
|
+Object {
|
|
|
|
+ "recording": false,
|
|
|
|
+ "redoStack": Array [],
|
|
|
|
+ "stateHistory": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "lastCommittedPoint": null,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "points": Array [
|
|
|
|
+ Array [
|
|
|
|
+ 0,
|
|
|
|
+ 0,
|
|
|
|
+ ],
|
|
|
|
+ Array [
|
|
|
|
+ 10,
|
|
|
|
+ 10,
|
|
|
|
+ ],
|
|
|
|
+ ],
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "arrow",
|
|
|
|
+ "version": 4,
|
|
|
|
+ "versionNonce": 449462985,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+}
|
|
|
|
+`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests hotkey a selects arrow tool: [end of test] number of elements 1`] = `1`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests hotkey a selects arrow tool: [end of test] number of renders 1`] = `5`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests hotkey d selects diamond tool: [end of test] appState 1`] = `
|
|
|
|
+Object {
|
|
|
|
+ "collaborators": Map {},
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "cursorX": 0,
|
|
|
|
+ "cursorY": 0,
|
|
|
|
+ "draggingElement": null,
|
|
|
|
+ "editingElement": null,
|
|
|
|
+ "elementLocked": false,
|
|
|
|
+ "elementType": "selection",
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "isCollaborating": false,
|
|
|
|
+ "isResizing": false,
|
|
|
|
+ "lastPointerDownWith": "mouse",
|
|
|
|
+ "multiElement": null,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "openMenu": null,
|
|
|
|
+ "resizingElement": null,
|
|
|
|
+ "scrollX": 0,
|
|
|
|
+ "scrollY": 0,
|
|
|
|
+ "scrolledOutside": false,
|
|
|
|
+ "selectedElementIds": Object {
|
|
|
|
+ "id0": true,
|
|
|
|
+ },
|
|
|
|
+ "selectionElement": null,
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ "zoom": 1,
|
|
|
|
+}
|
|
|
|
+`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests hotkey d selects diamond tool: [end of test] element 0 1`] = `
|
|
|
|
+Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "diamond",
|
|
|
|
+ "version": 2,
|
|
|
|
+ "versionNonce": 1278240551,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+}
|
|
|
|
+`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests hotkey d selects diamond tool: [end of test] history 1`] = `
|
|
|
|
+Object {
|
|
|
|
+ "recording": false,
|
|
|
|
+ "redoStack": Array [],
|
|
|
|
+ "stateHistory": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "diamond",
|
|
|
|
+ "version": 3,
|
|
|
|
+ "versionNonce": 1278240551,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+}
|
|
|
|
+`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests hotkey d selects diamond tool: [end of test] number of elements 1`] = `1`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests hotkey d selects diamond tool: [end of test] number of renders 1`] = `5`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests hotkey e selects ellipse tool: [end of test] appState 1`] = `
|
|
|
|
+Object {
|
|
|
|
+ "collaborators": Map {},
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "cursorX": 0,
|
|
|
|
+ "cursorY": 0,
|
|
|
|
+ "draggingElement": null,
|
|
|
|
+ "editingElement": null,
|
|
|
|
+ "elementLocked": false,
|
|
|
|
+ "elementType": "selection",
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "isCollaborating": false,
|
|
|
|
+ "isResizing": false,
|
|
|
|
+ "lastPointerDownWith": "mouse",
|
|
|
|
+ "multiElement": null,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "openMenu": null,
|
|
|
|
+ "resizingElement": null,
|
|
|
|
+ "scrollX": 0,
|
|
|
|
+ "scrollY": 0,
|
|
|
|
+ "scrolledOutside": false,
|
|
|
|
+ "selectedElementIds": Object {
|
|
|
|
+ "id0": true,
|
|
|
|
+ },
|
|
|
|
+ "selectionElement": null,
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ "zoom": 1,
|
|
|
|
+}
|
|
|
|
+`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests hotkey e selects ellipse tool: [end of test] element 0 1`] = `
|
|
|
|
+Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "ellipse",
|
|
|
|
+ "version": 2,
|
|
|
|
+ "versionNonce": 1278240551,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+}
|
|
|
|
+`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests hotkey e selects ellipse tool: [end of test] history 1`] = `
|
|
|
|
+Object {
|
|
|
|
+ "recording": false,
|
|
|
|
+ "redoStack": Array [],
|
|
|
|
+ "stateHistory": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "ellipse",
|
|
|
|
+ "version": 3,
|
|
|
|
+ "versionNonce": 1278240551,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+}
|
|
|
|
+`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests hotkey e selects ellipse tool: [end of test] number of elements 1`] = `1`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests hotkey e selects ellipse tool: [end of test] number of renders 1`] = `5`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests hotkey l selects line tool: [end of test] appState 1`] = `
|
|
|
|
+Object {
|
|
|
|
+ "collaborators": Map {},
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "cursorX": 0,
|
|
|
|
+ "cursorY": 0,
|
|
|
|
+ "draggingElement": null,
|
|
|
|
+ "editingElement": null,
|
|
|
|
+ "elementLocked": false,
|
|
|
|
+ "elementType": "selection",
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "isCollaborating": false,
|
|
|
|
+ "isResizing": false,
|
|
|
|
+ "lastPointerDownWith": "mouse",
|
|
|
|
+ "multiElement": null,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "openMenu": null,
|
|
|
|
+ "resizingElement": null,
|
|
|
|
+ "scrollX": 0,
|
|
|
|
+ "scrollY": 0,
|
|
|
|
+ "scrolledOutside": false,
|
|
|
|
+ "selectedElementIds": Object {
|
|
|
|
+ "id0": true,
|
|
|
|
+ },
|
|
|
|
+ "selectionElement": null,
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ "zoom": 1,
|
|
|
|
+}
|
|
|
|
+`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests hotkey l selects line tool: [end of test] element 0 1`] = `
|
|
|
|
+Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "lastCommittedPoint": null,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "points": Array [
|
|
|
|
+ Array [
|
|
|
|
+ 0,
|
|
|
|
+ 0,
|
|
|
|
+ ],
|
|
|
|
+ Array [
|
|
|
|
+ 10,
|
|
|
|
+ 10,
|
|
|
|
+ ],
|
|
|
|
+ ],
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "line",
|
|
|
|
+ "version": 3,
|
|
|
|
+ "versionNonce": 449462985,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+}
|
|
|
|
+`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests hotkey l selects line tool: [end of test] history 1`] = `
|
|
|
|
+Object {
|
|
|
|
+ "recording": false,
|
|
|
|
+ "redoStack": Array [],
|
|
|
|
+ "stateHistory": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "lastCommittedPoint": null,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "points": Array [
|
|
|
|
+ Array [
|
|
|
|
+ 0,
|
|
|
|
+ 0,
|
|
|
|
+ ],
|
|
|
|
+ Array [
|
|
|
|
+ 10,
|
|
|
|
+ 10,
|
|
|
|
+ ],
|
|
|
|
+ ],
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "line",
|
|
|
|
+ "version": 4,
|
|
|
|
+ "versionNonce": 449462985,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+}
|
|
|
|
+`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests hotkey l selects line tool: [end of test] number of elements 1`] = `1`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests hotkey l selects line tool: [end of test] number of renders 1`] = `5`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests hotkey r selects rectangle tool: [end of test] appState 1`] = `
|
|
|
|
+Object {
|
|
|
|
+ "collaborators": Map {},
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "cursorX": 0,
|
|
|
|
+ "cursorY": 0,
|
|
|
|
+ "draggingElement": null,
|
|
|
|
+ "editingElement": null,
|
|
|
|
+ "elementLocked": false,
|
|
|
|
+ "elementType": "selection",
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "isCollaborating": false,
|
|
|
|
+ "isResizing": false,
|
|
|
|
+ "lastPointerDownWith": "mouse",
|
|
|
|
+ "multiElement": null,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "openMenu": null,
|
|
|
|
+ "resizingElement": null,
|
|
|
|
+ "scrollX": 0,
|
|
|
|
+ "scrollY": 0,
|
|
|
|
+ "scrolledOutside": false,
|
|
|
|
+ "selectedElementIds": Object {
|
|
|
|
+ "id0": true,
|
|
|
|
+ },
|
|
|
|
+ "selectionElement": null,
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ "zoom": 1,
|
|
|
|
+}
|
|
|
|
+`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests hotkey r selects rectangle tool: [end of test] element 0 1`] = `
|
|
|
|
+Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 2,
|
|
|
|
+ "versionNonce": 1278240551,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+}
|
|
|
|
+`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests hotkey r selects rectangle tool: [end of test] history 1`] = `
|
|
|
|
+Object {
|
|
|
|
+ "recording": false,
|
|
|
|
+ "redoStack": Array [],
|
|
|
|
+ "stateHistory": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 3,
|
|
|
|
+ "versionNonce": 1278240551,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+}
|
|
|
|
+`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests hotkey r selects rectangle tool: [end of test] number of elements 1`] = `1`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests hotkey r selects rectangle tool: [end of test] number of renders 1`] = `5`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests pinch-to-zoom works: [end of test] appState 1`] = `
|
|
|
|
+Object {
|
|
|
|
+ "collaborators": Map {},
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "cursorX": 0,
|
|
|
|
+ "cursorY": 0,
|
|
|
|
+ "draggingElement": null,
|
|
|
|
+ "editingElement": null,
|
|
|
|
+ "elementLocked": false,
|
|
|
|
+ "elementType": "selection",
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "isCollaborating": false,
|
|
|
|
+ "isResizing": false,
|
|
|
|
+ "lastPointerDownWith": "touch",
|
|
|
|
+ "multiElement": null,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "openMenu": null,
|
|
|
|
+ "resizingElement": null,
|
|
|
|
+ "scrollX": -6,
|
|
|
|
+ "scrollY": 0,
|
|
|
|
+ "scrolledOutside": false,
|
|
|
|
+ "selectedElementIds": Object {
|
|
|
|
+ "id0": true,
|
|
|
|
+ },
|
|
|
|
+ "selectionElement": null,
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ "zoom": 1,
|
|
|
|
+}
|
|
|
|
+`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests pinch-to-zoom works: [end of test] history 1`] = `
|
|
|
|
+Object {
|
|
|
|
+ "recording": false,
|
|
|
|
+ "redoStack": Array [],
|
|
|
|
+ "stateHistory": Array [],
|
|
|
|
+}
|
|
|
|
+`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests pinch-to-zoom works: [end of test] number of elements 1`] = `0`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests pinch-to-zoom works: [end of test] number of renders 1`] = `7`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests resize an element, trying every resize handle: [end of test] appState 1`] = `
|
|
|
|
+Object {
|
|
|
|
+ "collaborators": Map {},
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "cursorX": 0,
|
|
|
|
+ "cursorY": 0,
|
|
|
|
+ "draggingElement": null,
|
|
|
|
+ "editingElement": null,
|
|
|
|
+ "elementLocked": false,
|
|
|
|
+ "elementType": "selection",
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "isCollaborating": false,
|
|
|
|
+ "isResizing": false,
|
|
|
|
+ "lastPointerDownWith": "mouse",
|
|
|
|
+ "multiElement": null,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "openMenu": null,
|
|
|
|
+ "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,
|
|
|
|
+ },
|
|
|
|
+ "selectionElement": null,
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ "zoom": 1,
|
|
|
|
+}
|
|
|
|
+`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests resize an element, trying every resize handle: [end of test] element 0 1`] = `
|
|
|
|
+Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 34,
|
|
|
|
+ "versionNonce": 1388251943,
|
|
|
|
+ "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 {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 3,
|
|
|
|
+ "versionNonce": 1278240551,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 15,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 5,
|
|
|
|
+ "versionNonce": 2019559783,
|
|
|
|
+ "width": 15,
|
|
|
|
+ "x": 5,
|
|
|
|
+ "y": 5,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 7,
|
|
|
|
+ "versionNonce": 238820263,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 5,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 9,
|
|
|
|
+ "versionNonce": 23633383,
|
|
|
|
+ "width": 5,
|
|
|
|
+ "x": 15,
|
|
|
|
+ "y": 15,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 11,
|
|
|
|
+ "versionNonce": 747212839,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 15,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 13,
|
|
|
|
+ "versionNonce": 289600103,
|
|
|
|
+ "width": 5,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 5,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 15,
|
|
|
|
+ "versionNonce": 406373543,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 5,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 17,
|
|
|
|
+ "versionNonce": 1359939303,
|
|
|
|
+ "width": 15,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 15,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 19,
|
|
|
|
+ "versionNonce": 845789479,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 5,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 21,
|
|
|
|
+ "versionNonce": 1508694887,
|
|
|
|
+ "width": 15,
|
|
|
|
+ "x": 5,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 23,
|
|
|
|
+ "versionNonce": 1279028647,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 15,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 25,
|
|
|
|
+ "versionNonce": 888958951,
|
|
|
|
+ "width": 5,
|
|
|
|
+ "x": 15,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 27,
|
|
|
|
+ "versionNonce": 651223591,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 5,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 29,
|
|
|
|
+ "versionNonce": 1532871783,
|
|
|
|
+ "width": 5,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 31,
|
|
|
|
+ "versionNonce": 1934038695,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 15,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 33,
|
|
|
|
+ "versionNonce": 909170919,
|
|
|
|
+ "width": 15,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 35,
|
|
|
|
+ "versionNonce": 1388251943,
|
|
|
|
+ "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 {
|
|
|
|
+ "collaborators": Map {},
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "cursorX": 0,
|
|
|
|
+ "cursorY": 0,
|
|
|
|
+ "draggingElement": null,
|
|
|
|
+ "editingElement": null,
|
|
|
|
+ "elementLocked": false,
|
|
|
|
+ "elementType": "selection",
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "isCollaborating": false,
|
|
|
|
+ "isResizing": false,
|
|
|
|
+ "lastPointerDownWith": "mouse",
|
|
|
|
+ "multiElement": null,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "openMenu": null,
|
|
|
|
+ "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,
|
|
|
|
+ },
|
|
|
|
+ "selectionElement": null,
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ "zoom": 1,
|
|
|
|
+}
|
|
|
|
+`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests resize an element, trying every resize handle: [resize handle ne (+5, +5)] element 0 1`] = `
|
|
|
|
+Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 5,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 16,
|
|
|
|
+ "versionNonce": 1359939303,
|
|
|
|
+ "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 {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 3,
|
|
|
|
+ "versionNonce": 1278240551,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 15,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 5,
|
|
|
|
+ "versionNonce": 2019559783,
|
|
|
|
+ "width": 15,
|
|
|
|
+ "x": 5,
|
|
|
|
+ "y": 5,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 7,
|
|
|
|
+ "versionNonce": 238820263,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 5,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 9,
|
|
|
|
+ "versionNonce": 23633383,
|
|
|
|
+ "width": 5,
|
|
|
|
+ "x": 15,
|
|
|
|
+ "y": 15,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 11,
|
|
|
|
+ "versionNonce": 747212839,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 15,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 13,
|
|
|
|
+ "versionNonce": 289600103,
|
|
|
|
+ "width": 5,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 5,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 15,
|
|
|
|
+ "versionNonce": 406373543,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 5,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 17,
|
|
|
|
+ "versionNonce": 1359939303,
|
|
|
|
+ "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 {
|
|
|
|
+ "collaborators": Map {},
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "cursorX": 0,
|
|
|
|
+ "cursorY": 0,
|
|
|
|
+ "draggingElement": null,
|
|
|
|
+ "editingElement": null,
|
|
|
|
+ "elementLocked": false,
|
|
|
|
+ "elementType": "selection",
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "isCollaborating": false,
|
|
|
|
+ "isResizing": false,
|
|
|
|
+ "lastPointerDownWith": "mouse",
|
|
|
|
+ "multiElement": null,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "openMenu": null,
|
|
|
|
+ "resizingElement": null,
|
|
|
|
+ "scrollX": 0,
|
|
|
|
+ "scrollY": 0,
|
|
|
|
+ "scrolledOutside": false,
|
|
|
|
+ "selectedElementIds": Object {
|
|
|
|
+ "id0": true,
|
|
|
|
+ "id1": true,
|
|
|
|
+ "id2": true,
|
|
|
|
+ "id3": true,
|
|
|
|
+ "id4": true,
|
|
|
|
+ "id5": true,
|
|
|
|
+ },
|
|
|
|
+ "selectionElement": null,
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ "zoom": 1,
|
|
|
|
+}
|
|
|
|
+`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests resize an element, trying every resize handle: [resize handle ne (-5, -5)] element 0 1`] = `
|
|
|
|
+Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 15,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 12,
|
|
|
|
+ "versionNonce": 289600103,
|
|
|
|
+ "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 {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 3,
|
|
|
|
+ "versionNonce": 1278240551,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 15,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 5,
|
|
|
|
+ "versionNonce": 2019559783,
|
|
|
|
+ "width": 15,
|
|
|
|
+ "x": 5,
|
|
|
|
+ "y": 5,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 7,
|
|
|
|
+ "versionNonce": 238820263,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 5,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 9,
|
|
|
|
+ "versionNonce": 23633383,
|
|
|
|
+ "width": 5,
|
|
|
|
+ "x": 15,
|
|
|
|
+ "y": 15,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 11,
|
|
|
|
+ "versionNonce": 747212839,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 15,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 13,
|
|
|
|
+ "versionNonce": 289600103,
|
|
|
|
+ "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 {
|
|
|
|
+ "collaborators": Map {},
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "cursorX": 0,
|
|
|
|
+ "cursorY": 0,
|
|
|
|
+ "draggingElement": null,
|
|
|
|
+ "editingElement": null,
|
|
|
|
+ "elementLocked": false,
|
|
|
|
+ "elementType": "selection",
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "isCollaborating": false,
|
|
|
|
+ "isResizing": false,
|
|
|
|
+ "lastPointerDownWith": "mouse",
|
|
|
|
+ "multiElement": null,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "openMenu": null,
|
|
|
|
+ "resizingElement": null,
|
|
|
|
+ "scrollX": 0,
|
|
|
|
+ "scrollY": 0,
|
|
|
|
+ "scrolledOutside": false,
|
|
|
|
+ "selectedElementIds": Object {
|
|
|
|
+ "id0": true,
|
|
|
|
+ "id1": true,
|
|
|
|
+ "id2": true,
|
|
|
|
+ "id3": true,
|
|
|
|
+ },
|
|
|
|
+ "selectionElement": null,
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ "zoom": 1,
|
|
|
|
+}
|
|
|
|
+`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests resize an element, trying every resize handle: [resize handle nw (+5, +5)] element 0 1`] = `
|
|
|
|
+Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 5,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 8,
|
|
|
|
+ "versionNonce": 23633383,
|
|
|
|
+ "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 {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 3,
|
|
|
|
+ "versionNonce": 1278240551,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 15,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 5,
|
|
|
|
+ "versionNonce": 2019559783,
|
|
|
|
+ "width": 15,
|
|
|
|
+ "x": 5,
|
|
|
|
+ "y": 5,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 7,
|
|
|
|
+ "versionNonce": 238820263,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 5,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 9,
|
|
|
|
+ "versionNonce": 23633383,
|
|
|
|
+ "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 {
|
|
|
|
+ "collaborators": Map {},
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "cursorX": 0,
|
|
|
|
+ "cursorY": 0,
|
|
|
|
+ "draggingElement": null,
|
|
|
|
+ "editingElement": null,
|
|
|
|
+ "elementLocked": false,
|
|
|
|
+ "elementType": "selection",
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "isCollaborating": false,
|
|
|
|
+ "isResizing": false,
|
|
|
|
+ "lastPointerDownWith": "mouse",
|
|
|
|
+ "multiElement": null,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "openMenu": null,
|
|
|
|
+ "resizingElement": null,
|
|
|
|
+ "scrollX": 0,
|
|
|
|
+ "scrollY": 0,
|
|
|
|
+ "scrolledOutside": false,
|
|
|
|
+ "selectedElementIds": Object {
|
|
|
|
+ "id0": true,
|
|
|
|
+ "id1": true,
|
|
|
|
+ },
|
|
|
|
+ "selectionElement": null,
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ "zoom": 1,
|
|
|
|
+}
|
|
|
|
+`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests resize an element, trying every resize handle: [resize handle nw (-5, -5)] element 0 1`] = `
|
|
|
|
+Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 15,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 4,
|
|
|
|
+ "versionNonce": 2019559783,
|
|
|
|
+ "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 {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 3,
|
|
|
|
+ "versionNonce": 1278240551,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 15,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 5,
|
|
|
|
+ "versionNonce": 2019559783,
|
|
|
|
+ "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 {
|
|
|
|
+ "collaborators": Map {},
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "cursorX": 0,
|
|
|
|
+ "cursorY": 0,
|
|
|
|
+ "draggingElement": null,
|
|
|
|
+ "editingElement": null,
|
|
|
|
+ "elementLocked": false,
|
|
|
|
+ "elementType": "selection",
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "isCollaborating": false,
|
|
|
|
+ "isResizing": false,
|
|
|
|
+ "lastPointerDownWith": "mouse",
|
|
|
|
+ "multiElement": null,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "openMenu": null,
|
|
|
|
+ "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,
|
|
|
|
+ },
|
|
|
|
+ "selectionElement": null,
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ "zoom": 1,
|
|
|
|
+}
|
|
|
|
+`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests resize an element, trying every resize handle: [resize handle se (+5, +5)] element 0 1`] = `
|
|
|
|
+Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 15,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 32,
|
|
|
|
+ "versionNonce": 909170919,
|
|
|
|
+ "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 {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 3,
|
|
|
|
+ "versionNonce": 1278240551,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 15,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 5,
|
|
|
|
+ "versionNonce": 2019559783,
|
|
|
|
+ "width": 15,
|
|
|
|
+ "x": 5,
|
|
|
|
+ "y": 5,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 7,
|
|
|
|
+ "versionNonce": 238820263,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 5,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 9,
|
|
|
|
+ "versionNonce": 23633383,
|
|
|
|
+ "width": 5,
|
|
|
|
+ "x": 15,
|
|
|
|
+ "y": 15,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 11,
|
|
|
|
+ "versionNonce": 747212839,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 15,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 13,
|
|
|
|
+ "versionNonce": 289600103,
|
|
|
|
+ "width": 5,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 5,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 15,
|
|
|
|
+ "versionNonce": 406373543,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 5,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 17,
|
|
|
|
+ "versionNonce": 1359939303,
|
|
|
|
+ "width": 15,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 15,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 19,
|
|
|
|
+ "versionNonce": 845789479,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 5,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 21,
|
|
|
|
+ "versionNonce": 1508694887,
|
|
|
|
+ "width": 15,
|
|
|
|
+ "x": 5,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 23,
|
|
|
|
+ "versionNonce": 1279028647,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 15,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 25,
|
|
|
|
+ "versionNonce": 888958951,
|
|
|
|
+ "width": 5,
|
|
|
|
+ "x": 15,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 27,
|
|
|
|
+ "versionNonce": 651223591,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 5,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 29,
|
|
|
|
+ "versionNonce": 1532871783,
|
|
|
|
+ "width": 5,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 31,
|
|
|
|
+ "versionNonce": 1934038695,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 15,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 33,
|
|
|
|
+ "versionNonce": 909170919,
|
|
|
|
+ "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 {
|
|
|
|
+ "collaborators": Map {},
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "cursorX": 0,
|
|
|
|
+ "cursorY": 0,
|
|
|
|
+ "draggingElement": null,
|
|
|
|
+ "editingElement": null,
|
|
|
|
+ "elementLocked": false,
|
|
|
|
+ "elementType": "selection",
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "isCollaborating": false,
|
|
|
|
+ "isResizing": false,
|
|
|
|
+ "lastPointerDownWith": "mouse",
|
|
|
|
+ "multiElement": null,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "openMenu": null,
|
|
|
|
+ "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,
|
|
|
|
+ },
|
|
|
|
+ "selectionElement": null,
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ "zoom": 1,
|
|
|
|
+}
|
|
|
|
+`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests resize an element, trying every resize handle: [resize handle se (-5, -5)] element 0 1`] = `
|
|
|
|
+Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 5,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 28,
|
|
|
|
+ "versionNonce": 1532871783,
|
|
|
|
+ "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 {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 3,
|
|
|
|
+ "versionNonce": 1278240551,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 15,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 5,
|
|
|
|
+ "versionNonce": 2019559783,
|
|
|
|
+ "width": 15,
|
|
|
|
+ "x": 5,
|
|
|
|
+ "y": 5,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 7,
|
|
|
|
+ "versionNonce": 238820263,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 5,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 9,
|
|
|
|
+ "versionNonce": 23633383,
|
|
|
|
+ "width": 5,
|
|
|
|
+ "x": 15,
|
|
|
|
+ "y": 15,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 11,
|
|
|
|
+ "versionNonce": 747212839,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 15,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 13,
|
|
|
|
+ "versionNonce": 289600103,
|
|
|
|
+ "width": 5,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 5,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 15,
|
|
|
|
+ "versionNonce": 406373543,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 5,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 17,
|
|
|
|
+ "versionNonce": 1359939303,
|
|
|
|
+ "width": 15,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 15,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 19,
|
|
|
|
+ "versionNonce": 845789479,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 5,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 21,
|
|
|
|
+ "versionNonce": 1508694887,
|
|
|
|
+ "width": 15,
|
|
|
|
+ "x": 5,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 23,
|
|
|
|
+ "versionNonce": 1279028647,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 15,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 25,
|
|
|
|
+ "versionNonce": 888958951,
|
|
|
|
+ "width": 5,
|
|
|
|
+ "x": 15,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 27,
|
|
|
|
+ "versionNonce": 651223591,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 5,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 29,
|
|
|
|
+ "versionNonce": 1532871783,
|
|
|
|
+ "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 {
|
|
|
|
+ "collaborators": Map {},
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "cursorX": 0,
|
|
|
|
+ "cursorY": 0,
|
|
|
|
+ "draggingElement": null,
|
|
|
|
+ "editingElement": null,
|
|
|
|
+ "elementLocked": false,
|
|
|
|
+ "elementType": "selection",
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "isCollaborating": false,
|
|
|
|
+ "isResizing": false,
|
|
|
|
+ "lastPointerDownWith": "mouse",
|
|
|
|
+ "multiElement": null,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "openMenu": null,
|
|
|
|
+ "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,
|
|
|
|
+ },
|
|
|
|
+ "selectionElement": null,
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ "zoom": 1,
|
|
|
|
+}
|
|
|
|
+`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests resize an element, trying every resize handle: [resize handle sw (+5, +5)] element 0 1`] = `
|
|
|
|
+Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 15,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 24,
|
|
|
|
+ "versionNonce": 888958951,
|
|
|
|
+ "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 {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 3,
|
|
|
|
+ "versionNonce": 1278240551,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 15,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 5,
|
|
|
|
+ "versionNonce": 2019559783,
|
|
|
|
+ "width": 15,
|
|
|
|
+ "x": 5,
|
|
|
|
+ "y": 5,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 7,
|
|
|
|
+ "versionNonce": 238820263,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 5,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 9,
|
|
|
|
+ "versionNonce": 23633383,
|
|
|
|
+ "width": 5,
|
|
|
|
+ "x": 15,
|
|
|
|
+ "y": 15,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 11,
|
|
|
|
+ "versionNonce": 747212839,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 15,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 13,
|
|
|
|
+ "versionNonce": 289600103,
|
|
|
|
+ "width": 5,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 5,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 15,
|
|
|
|
+ "versionNonce": 406373543,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 5,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 17,
|
|
|
|
+ "versionNonce": 1359939303,
|
|
|
|
+ "width": 15,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 15,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 19,
|
|
|
|
+ "versionNonce": 845789479,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 5,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 21,
|
|
|
|
+ "versionNonce": 1508694887,
|
|
|
|
+ "width": 15,
|
|
|
|
+ "x": 5,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 23,
|
|
|
|
+ "versionNonce": 1279028647,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 15,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 25,
|
|
|
|
+ "versionNonce": 888958951,
|
|
|
|
+ "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 {
|
|
|
|
+ "collaborators": Map {},
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "cursorX": 0,
|
|
|
|
+ "cursorY": 0,
|
|
|
|
+ "draggingElement": null,
|
|
|
|
+ "editingElement": null,
|
|
|
|
+ "elementLocked": false,
|
|
|
|
+ "elementType": "selection",
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "isCollaborating": false,
|
|
|
|
+ "isResizing": false,
|
|
|
|
+ "lastPointerDownWith": "mouse",
|
|
|
|
+ "multiElement": null,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "openMenu": null,
|
|
|
|
+ "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,
|
|
|
|
+ },
|
|
|
|
+ "selectionElement": null,
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ "zoom": 1,
|
|
|
|
+}
|
|
|
|
+`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests resize an element, trying every resize handle: [resize handle sw (-5, -5)] element 0 1`] = `
|
|
|
|
+Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 5,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 20,
|
|
|
|
+ "versionNonce": 1508694887,
|
|
|
|
+ "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 {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 3,
|
|
|
|
+ "versionNonce": 1278240551,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 15,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 5,
|
|
|
|
+ "versionNonce": 2019559783,
|
|
|
|
+ "width": 15,
|
|
|
|
+ "x": 5,
|
|
|
|
+ "y": 5,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 7,
|
|
|
|
+ "versionNonce": 238820263,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 5,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 9,
|
|
|
|
+ "versionNonce": 23633383,
|
|
|
|
+ "width": 5,
|
|
|
|
+ "x": 15,
|
|
|
|
+ "y": 15,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 11,
|
|
|
|
+ "versionNonce": 747212839,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 15,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 13,
|
|
|
|
+ "versionNonce": 289600103,
|
|
|
|
+ "width": 5,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 5,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 15,
|
|
|
|
+ "versionNonce": 406373543,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 5,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 17,
|
|
|
|
+ "versionNonce": 1359939303,
|
|
|
|
+ "width": 15,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 15,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 19,
|
|
|
|
+ "versionNonce": 845789479,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 5,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 21,
|
|
|
|
+ "versionNonce": 1508694887,
|
|
|
|
+ "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 {
|
|
|
|
+ "collaborators": Map {},
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "cursorX": 0,
|
|
|
|
+ "cursorY": 0,
|
|
|
|
+ "draggingElement": null,
|
|
|
|
+ "editingElement": null,
|
|
|
|
+ "elementLocked": false,
|
|
|
|
+ "elementType": "selection",
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "isCollaborating": false,
|
|
|
|
+ "isResizing": false,
|
|
|
|
+ "lastPointerDownWith": "mouse",
|
|
|
|
+ "multiElement": null,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "openMenu": null,
|
|
|
|
+ "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,
|
|
|
|
+ },
|
|
|
|
+ "selectionElement": null,
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ "zoom": 1,
|
|
|
|
+}
|
|
|
|
+`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests resize an element, trying every resize handle: [unresize handle ne (+5, +5)] element 0 1`] = `
|
|
|
|
+Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "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 ne (+5, +5)] history 1`] = `
|
|
|
|
+Object {
|
|
|
|
+ "recording": false,
|
|
|
|
+ "redoStack": Array [],
|
|
|
|
+ "stateHistory": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 3,
|
|
|
|
+ "versionNonce": 1278240551,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 15,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 5,
|
|
|
|
+ "versionNonce": 2019559783,
|
|
|
|
+ "width": 15,
|
|
|
|
+ "x": 5,
|
|
|
|
+ "y": 5,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 7,
|
|
|
|
+ "versionNonce": 238820263,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 5,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 9,
|
|
|
|
+ "versionNonce": 23633383,
|
|
|
|
+ "width": 5,
|
|
|
|
+ "x": 15,
|
|
|
|
+ "y": 15,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 11,
|
|
|
|
+ "versionNonce": 747212839,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 15,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 13,
|
|
|
|
+ "versionNonce": 289600103,
|
|
|
|
+ "width": 5,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 5,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 15,
|
|
|
|
+ "versionNonce": 406373543,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 5,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 17,
|
|
|
|
+ "versionNonce": 1359939303,
|
|
|
|
+ "width": 15,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 15,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 19,
|
|
|
|
+ "versionNonce": 845789479,
|
|
|
|
+ "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 {
|
|
|
|
+ "collaborators": Map {},
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "cursorX": 0,
|
|
|
|
+ "cursorY": 0,
|
|
|
|
+ "draggingElement": null,
|
|
|
|
+ "editingElement": null,
|
|
|
|
+ "elementLocked": false,
|
|
|
|
+ "elementType": "selection",
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "isCollaborating": false,
|
|
|
|
+ "isResizing": false,
|
|
|
|
+ "lastPointerDownWith": "mouse",
|
|
|
|
+ "multiElement": null,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "openMenu": null,
|
|
|
|
+ "resizingElement": null,
|
|
|
|
+ "scrollX": 0,
|
|
|
|
+ "scrollY": 0,
|
|
|
|
+ "scrolledOutside": false,
|
|
|
|
+ "selectedElementIds": Object {
|
|
|
|
+ "id0": true,
|
|
|
|
+ "id1": true,
|
|
|
|
+ "id2": true,
|
|
|
|
+ "id3": true,
|
|
|
|
+ "id4": true,
|
|
|
|
+ "id5": true,
|
|
|
|
+ "id6": true,
|
|
|
|
+ },
|
|
|
|
+ "selectionElement": null,
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ "zoom": 1,
|
|
|
|
+}
|
|
|
|
+`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests resize an element, trying every resize handle: [unresize handle ne (-5, -5)] element 0 1`] = `
|
|
|
|
+Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "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 ne (-5, -5)] history 1`] = `
|
|
|
|
+Object {
|
|
|
|
+ "recording": false,
|
|
|
|
+ "redoStack": Array [],
|
|
|
|
+ "stateHistory": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 3,
|
|
|
|
+ "versionNonce": 1278240551,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 15,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 5,
|
|
|
|
+ "versionNonce": 2019559783,
|
|
|
|
+ "width": 15,
|
|
|
|
+ "x": 5,
|
|
|
|
+ "y": 5,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 7,
|
|
|
|
+ "versionNonce": 238820263,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 5,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 9,
|
|
|
|
+ "versionNonce": 23633383,
|
|
|
|
+ "width": 5,
|
|
|
|
+ "x": 15,
|
|
|
|
+ "y": 15,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 11,
|
|
|
|
+ "versionNonce": 747212839,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 15,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 13,
|
|
|
|
+ "versionNonce": 289600103,
|
|
|
|
+ "width": 5,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 5,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 15,
|
|
|
|
+ "versionNonce": 406373543,
|
|
|
|
+ "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 {
|
|
|
|
+ "collaborators": Map {},
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "cursorX": 0,
|
|
|
|
+ "cursorY": 0,
|
|
|
|
+ "draggingElement": null,
|
|
|
|
+ "editingElement": null,
|
|
|
|
+ "elementLocked": false,
|
|
|
|
+ "elementType": "selection",
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "isCollaborating": false,
|
|
|
|
+ "isResizing": false,
|
|
|
|
+ "lastPointerDownWith": "mouse",
|
|
|
|
+ "multiElement": null,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "openMenu": null,
|
|
|
|
+ "resizingElement": null,
|
|
|
|
+ "scrollX": 0,
|
|
|
|
+ "scrollY": 0,
|
|
|
|
+ "scrolledOutside": false,
|
|
|
|
+ "selectedElementIds": Object {
|
|
|
|
+ "id0": true,
|
|
|
|
+ "id1": true,
|
|
|
|
+ "id2": true,
|
|
|
|
+ "id3": true,
|
|
|
|
+ "id4": true,
|
|
|
|
+ },
|
|
|
|
+ "selectionElement": null,
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ "zoom": 1,
|
|
|
|
+}
|
|
|
|
+`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests resize an element, trying every resize handle: [unresize handle nw (+5, +5)] element 0 1`] = `
|
|
|
|
+Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "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 nw (+5, +5)] history 1`] = `
|
|
|
|
+Object {
|
|
|
|
+ "recording": false,
|
|
|
|
+ "redoStack": Array [],
|
|
|
|
+ "stateHistory": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 3,
|
|
|
|
+ "versionNonce": 1278240551,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 15,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 5,
|
|
|
|
+ "versionNonce": 2019559783,
|
|
|
|
+ "width": 15,
|
|
|
|
+ "x": 5,
|
|
|
|
+ "y": 5,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 7,
|
|
|
|
+ "versionNonce": 238820263,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 5,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 9,
|
|
|
|
+ "versionNonce": 23633383,
|
|
|
|
+ "width": 5,
|
|
|
|
+ "x": 15,
|
|
|
|
+ "y": 15,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 11,
|
|
|
|
+ "versionNonce": 747212839,
|
|
|
|
+ "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 {
|
|
|
|
+ "collaborators": Map {},
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "cursorX": 0,
|
|
|
|
+ "cursorY": 0,
|
|
|
|
+ "draggingElement": null,
|
|
|
|
+ "editingElement": null,
|
|
|
|
+ "elementLocked": false,
|
|
|
|
+ "elementType": "selection",
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "isCollaborating": false,
|
|
|
|
+ "isResizing": false,
|
|
|
|
+ "lastPointerDownWith": "mouse",
|
|
|
|
+ "multiElement": null,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "openMenu": null,
|
|
|
|
+ "resizingElement": null,
|
|
|
|
+ "scrollX": 0,
|
|
|
|
+ "scrollY": 0,
|
|
|
|
+ "scrolledOutside": false,
|
|
|
|
+ "selectedElementIds": Object {
|
|
|
|
+ "id0": true,
|
|
|
|
+ "id1": true,
|
|
|
|
+ "id2": true,
|
|
|
|
+ },
|
|
|
|
+ "selectionElement": null,
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ "zoom": 1,
|
|
|
|
+}
|
|
|
|
+`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests resize an element, trying every resize handle: [unresize handle nw (-5, -5)] element 0 1`] = `
|
|
|
|
+Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "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 {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 3,
|
|
|
|
+ "versionNonce": 1278240551,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 15,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 5,
|
|
|
|
+ "versionNonce": 2019559783,
|
|
|
|
+ "width": 15,
|
|
|
|
+ "x": 5,
|
|
|
|
+ "y": 5,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 7,
|
|
|
|
+ "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`] = `11`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests resize an element, trying every resize handle: [unresize handle se (+5, +5)] appState 1`] = `
|
|
|
|
+Object {
|
|
|
|
+ "collaborators": Map {},
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "cursorX": 0,
|
|
|
|
+ "cursorY": 0,
|
|
|
|
+ "draggingElement": null,
|
|
|
|
+ "editingElement": null,
|
|
|
|
+ "elementLocked": false,
|
|
|
|
+ "elementType": "selection",
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "isCollaborating": false,
|
|
|
|
+ "isResizing": false,
|
|
|
|
+ "lastPointerDownWith": "mouse",
|
|
|
|
+ "multiElement": null,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "openMenu": null,
|
|
|
|
+ "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,
|
|
|
|
+ },
|
|
|
|
+ "selectionElement": null,
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ "zoom": 1,
|
|
|
|
+}
|
|
|
|
+`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests resize an element, trying every resize handle: [unresize handle se (+5, +5)] element 0 1`] = `
|
|
|
|
+Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 34,
|
|
|
|
+ "versionNonce": 1388251943,
|
|
|
|
+ "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 {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 3,
|
|
|
|
+ "versionNonce": 1278240551,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 15,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 5,
|
|
|
|
+ "versionNonce": 2019559783,
|
|
|
|
+ "width": 15,
|
|
|
|
+ "x": 5,
|
|
|
|
+ "y": 5,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 7,
|
|
|
|
+ "versionNonce": 238820263,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 5,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 9,
|
|
|
|
+ "versionNonce": 23633383,
|
|
|
|
+ "width": 5,
|
|
|
|
+ "x": 15,
|
|
|
|
+ "y": 15,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 11,
|
|
|
|
+ "versionNonce": 747212839,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 15,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 13,
|
|
|
|
+ "versionNonce": 289600103,
|
|
|
|
+ "width": 5,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 5,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 15,
|
|
|
|
+ "versionNonce": 406373543,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 5,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 17,
|
|
|
|
+ "versionNonce": 1359939303,
|
|
|
|
+ "width": 15,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 15,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 19,
|
|
|
|
+ "versionNonce": 845789479,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 5,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 21,
|
|
|
|
+ "versionNonce": 1508694887,
|
|
|
|
+ "width": 15,
|
|
|
|
+ "x": 5,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 23,
|
|
|
|
+ "versionNonce": 1279028647,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 15,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 25,
|
|
|
|
+ "versionNonce": 888958951,
|
|
|
|
+ "width": 5,
|
|
|
|
+ "x": 15,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 27,
|
|
|
|
+ "versionNonce": 651223591,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 5,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 29,
|
|
|
|
+ "versionNonce": 1532871783,
|
|
|
|
+ "width": 5,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 31,
|
|
|
|
+ "versionNonce": 1934038695,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 15,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 33,
|
|
|
|
+ "versionNonce": 909170919,
|
|
|
|
+ "width": 15,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 35,
|
|
|
|
+ "versionNonce": 1388251943,
|
|
|
|
+ "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 {
|
|
|
|
+ "collaborators": Map {},
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "cursorX": 0,
|
|
|
|
+ "cursorY": 0,
|
|
|
|
+ "draggingElement": null,
|
|
|
|
+ "editingElement": null,
|
|
|
|
+ "elementLocked": false,
|
|
|
|
+ "elementType": "selection",
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "isCollaborating": false,
|
|
|
|
+ "isResizing": false,
|
|
|
|
+ "lastPointerDownWith": "mouse",
|
|
|
|
+ "multiElement": null,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "openMenu": null,
|
|
|
|
+ "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,
|
|
|
|
+ },
|
|
|
|
+ "selectionElement": null,
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ "zoom": 1,
|
|
|
|
+}
|
|
|
|
+`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests resize an element, trying every resize handle: [unresize handle se (-5, -5)] element 0 1`] = `
|
|
|
|
+Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 30,
|
|
|
|
+ "versionNonce": 1934038695,
|
|
|
|
+ "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 {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 3,
|
|
|
|
+ "versionNonce": 1278240551,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 15,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 5,
|
|
|
|
+ "versionNonce": 2019559783,
|
|
|
|
+ "width": 15,
|
|
|
|
+ "x": 5,
|
|
|
|
+ "y": 5,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 7,
|
|
|
|
+ "versionNonce": 238820263,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 5,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 9,
|
|
|
|
+ "versionNonce": 23633383,
|
|
|
|
+ "width": 5,
|
|
|
|
+ "x": 15,
|
|
|
|
+ "y": 15,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 11,
|
|
|
|
+ "versionNonce": 747212839,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 15,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 13,
|
|
|
|
+ "versionNonce": 289600103,
|
|
|
|
+ "width": 5,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 5,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 15,
|
|
|
|
+ "versionNonce": 406373543,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 5,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 17,
|
|
|
|
+ "versionNonce": 1359939303,
|
|
|
|
+ "width": 15,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 15,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 19,
|
|
|
|
+ "versionNonce": 845789479,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 5,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 21,
|
|
|
|
+ "versionNonce": 1508694887,
|
|
|
|
+ "width": 15,
|
|
|
|
+ "x": 5,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 23,
|
|
|
|
+ "versionNonce": 1279028647,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 15,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 25,
|
|
|
|
+ "versionNonce": 888958951,
|
|
|
|
+ "width": 5,
|
|
|
|
+ "x": 15,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 27,
|
|
|
|
+ "versionNonce": 651223591,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 5,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 29,
|
|
|
|
+ "versionNonce": 1532871783,
|
|
|
|
+ "width": 5,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 31,
|
|
|
|
+ "versionNonce": 1934038695,
|
|
|
|
+ "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 {
|
|
|
|
+ "collaborators": Map {},
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "cursorX": 0,
|
|
|
|
+ "cursorY": 0,
|
|
|
|
+ "draggingElement": null,
|
|
|
|
+ "editingElement": null,
|
|
|
|
+ "elementLocked": false,
|
|
|
|
+ "elementType": "selection",
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "isCollaborating": false,
|
|
|
|
+ "isResizing": false,
|
|
|
|
+ "lastPointerDownWith": "mouse",
|
|
|
|
+ "multiElement": null,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "openMenu": null,
|
|
|
|
+ "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,
|
|
|
|
+ },
|
|
|
|
+ "selectionElement": null,
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ "zoom": 1,
|
|
|
|
+}
|
|
|
|
+`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests resize an element, trying every resize handle: [unresize handle sw (+5, +5)] element 0 1`] = `
|
|
|
|
+Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 26,
|
|
|
|
+ "versionNonce": 651223591,
|
|
|
|
+ "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 {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 3,
|
|
|
|
+ "versionNonce": 1278240551,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 15,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 5,
|
|
|
|
+ "versionNonce": 2019559783,
|
|
|
|
+ "width": 15,
|
|
|
|
+ "x": 5,
|
|
|
|
+ "y": 5,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 7,
|
|
|
|
+ "versionNonce": 238820263,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 5,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 9,
|
|
|
|
+ "versionNonce": 23633383,
|
|
|
|
+ "width": 5,
|
|
|
|
+ "x": 15,
|
|
|
|
+ "y": 15,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 11,
|
|
|
|
+ "versionNonce": 747212839,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 15,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 13,
|
|
|
|
+ "versionNonce": 289600103,
|
|
|
|
+ "width": 5,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 5,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 15,
|
|
|
|
+ "versionNonce": 406373543,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 5,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 17,
|
|
|
|
+ "versionNonce": 1359939303,
|
|
|
|
+ "width": 15,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 15,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 19,
|
|
|
|
+ "versionNonce": 845789479,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 5,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 21,
|
|
|
|
+ "versionNonce": 1508694887,
|
|
|
|
+ "width": 15,
|
|
|
|
+ "x": 5,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 23,
|
|
|
|
+ "versionNonce": 1279028647,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 15,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 25,
|
|
|
|
+ "versionNonce": 888958951,
|
|
|
|
+ "width": 5,
|
|
|
|
+ "x": 15,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 27,
|
|
|
|
+ "versionNonce": 651223591,
|
|
|
|
+ "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 {
|
|
|
|
+ "collaborators": Map {},
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "cursorX": 0,
|
|
|
|
+ "cursorY": 0,
|
|
|
|
+ "draggingElement": null,
|
|
|
|
+ "editingElement": null,
|
|
|
|
+ "elementLocked": false,
|
|
|
|
+ "elementType": "selection",
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "isCollaborating": false,
|
|
|
|
+ "isResizing": false,
|
|
|
|
+ "lastPointerDownWith": "mouse",
|
|
|
|
+ "multiElement": null,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "openMenu": null,
|
|
|
|
+ "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,
|
|
|
|
+ },
|
|
|
|
+ "selectionElement": null,
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ "zoom": 1,
|
|
|
|
+}
|
|
|
|
+`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests resize an element, trying every resize handle: [unresize handle sw (-5, -5)] element 0 1`] = `
|
|
|
|
+Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 22,
|
|
|
|
+ "versionNonce": 1279028647,
|
|
|
|
+ "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 {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 3,
|
|
|
|
+ "versionNonce": 1278240551,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 15,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 5,
|
|
|
|
+ "versionNonce": 2019559783,
|
|
|
|
+ "width": 15,
|
|
|
|
+ "x": 5,
|
|
|
|
+ "y": 5,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 7,
|
|
|
|
+ "versionNonce": 238820263,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 5,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 9,
|
|
|
|
+ "versionNonce": 23633383,
|
|
|
|
+ "width": 5,
|
|
|
|
+ "x": 15,
|
|
|
|
+ "y": 15,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 11,
|
|
|
|
+ "versionNonce": 747212839,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 15,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 13,
|
|
|
|
+ "versionNonce": 289600103,
|
|
|
|
+ "width": 5,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 5,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 15,
|
|
|
|
+ "versionNonce": 406373543,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 5,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 17,
|
|
|
|
+ "versionNonce": 1359939303,
|
|
|
|
+ "width": 15,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 15,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 19,
|
|
|
|
+ "versionNonce": 845789479,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 5,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 21,
|
|
|
|
+ "versionNonce": 1508694887,
|
|
|
|
+ "width": 15,
|
|
|
|
+ "x": 5,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 23,
|
|
|
|
+ "versionNonce": 1279028647,
|
|
|
|
+ "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 shift-click to select a group, then drag: [end of test] appState 1`] = `
|
|
|
|
+Object {
|
|
|
|
+ "collaborators": Map {},
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "cursorX": 0,
|
|
|
|
+ "cursorY": 0,
|
|
|
|
+ "draggingElement": null,
|
|
|
|
+ "editingElement": null,
|
|
|
|
+ "elementLocked": false,
|
|
|
|
+ "elementType": "selection",
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "isCollaborating": false,
|
|
|
|
+ "isResizing": false,
|
|
|
|
+ "lastPointerDownWith": "mouse",
|
|
|
|
+ "multiElement": null,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "openMenu": null,
|
|
|
|
+ "resizingElement": null,
|
|
|
|
+ "scrollX": 0,
|
|
|
|
+ "scrollY": 0,
|
|
|
|
+ "scrolledOutside": false,
|
|
|
|
+ "selectedElementIds": Object {
|
|
|
|
+ "id0": true,
|
|
|
|
+ "id1": true,
|
|
|
|
+ "id2": true,
|
|
|
|
+ "id3": true,
|
|
|
|
+ "id4": true,
|
|
|
|
+ },
|
|
|
|
+ "selectionElement": null,
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ "zoom": 1,
|
|
|
|
+}
|
|
|
|
+`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests shift-click to select a group, then drag: [end of test] element 0 1`] = `
|
|
|
|
+Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 3,
|
|
|
|
+ "versionNonce": 493213705,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 20,
|
|
|
|
+ "y": 20,
|
|
|
|
+}
|
|
|
|
+`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests shift-click to select a group, then drag: [end of test] element 1 1`] = `
|
|
|
|
+Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id1",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 453191,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 3,
|
|
|
|
+ "versionNonce": 915032327,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 40,
|
|
|
|
+ "y": 20,
|
|
|
|
+}
|
|
|
|
+`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests shift-click to select a group, then drag: [end of test] history 1`] = `
|
|
|
|
+Object {
|
|
|
|
+ "recording": false,
|
|
|
|
+ "redoStack": Array [],
|
|
|
|
+ "stateHistory": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 3,
|
|
|
|
+ "versionNonce": 1278240551,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 3,
|
|
|
|
+ "versionNonce": 1278240551,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id1",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 453191,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 3,
|
|
|
|
+ "versionNonce": 401146281,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 30,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 4,
|
|
|
|
+ "versionNonce": 493213705,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 20,
|
|
|
|
+ "y": 20,
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id1",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 453191,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 4,
|
|
|
|
+ "versionNonce": 915032327,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 40,
|
|
|
|
+ "y": 20,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+}
|
|
|
|
+`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests shift-click to select a group, then drag: [end of test] number of elements 1`] = `2`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests shift-click to select a group, then drag: [end of test] number of renders 1`] = `16`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests spacebar + drag scrolls the canvas: [end of test] appState 1`] = `
|
|
|
|
+Object {
|
|
|
|
+ "collaborators": Map {},
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "cursorX": 0,
|
|
|
|
+ "cursorY": 0,
|
|
|
|
+ "draggingElement": null,
|
|
|
|
+ "editingElement": null,
|
|
|
|
+ "elementLocked": false,
|
|
|
|
+ "elementType": "selection",
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "isCollaborating": false,
|
|
|
|
+ "isResizing": false,
|
|
|
|
+ "lastPointerDownWith": "mouse",
|
|
|
|
+ "multiElement": null,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "openMenu": null,
|
|
|
|
+ "resizingElement": null,
|
|
|
|
+ "scrollX": 10,
|
|
|
|
+ "scrollY": 10,
|
|
|
|
+ "scrolledOutside": false,
|
|
|
|
+ "selectedElementIds": Object {},
|
|
|
|
+ "selectionElement": null,
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ "zoom": 1,
|
|
|
|
+}
|
|
|
|
+`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests spacebar + drag scrolls the canvas: [end of test] history 1`] = `
|
|
|
|
+Object {
|
|
|
|
+ "recording": false,
|
|
|
|
+ "redoStack": Array [],
|
|
|
|
+ "stateHistory": Array [],
|
|
|
|
+}
|
|
|
|
+`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests spacebar + drag scrolls the canvas: [end of test] number of elements 1`] = `0`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests spacebar + drag scrolls the canvas: [end of test] number of renders 1`] = `3`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests two-finger scroll works: [end of test] appState 1`] = `
|
|
|
|
+Object {
|
|
|
|
+ "collaborators": Map {},
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "cursorX": 0,
|
|
|
|
+ "cursorY": 0,
|
|
|
|
+ "draggingElement": null,
|
|
|
|
+ "editingElement": null,
|
|
|
|
+ "elementLocked": false,
|
|
|
|
+ "elementType": "selection",
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "isCollaborating": false,
|
|
|
|
+ "isResizing": false,
|
|
|
|
+ "lastPointerDownWith": "mouse",
|
|
|
|
+ "multiElement": null,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "openMenu": null,
|
|
|
|
+ "resizingElement": null,
|
|
|
|
+ "scrollX": 8,
|
|
|
|
+ "scrollY": -9,
|
|
|
|
+ "scrolledOutside": false,
|
|
|
|
+ "selectedElementIds": Object {
|
|
|
|
+ "id1": true,
|
|
|
|
+ },
|
|
|
|
+ "selectionElement": null,
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ "zoom": 1,
|
|
|
|
+}
|
|
|
|
+`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests two-finger scroll works: [end of test] history 1`] = `
|
|
|
|
+Object {
|
|
|
|
+ "recording": false,
|
|
|
|
+ "redoStack": Array [],
|
|
|
|
+ "stateHistory": Array [],
|
|
|
|
+}
|
|
|
|
+`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests two-finger scroll works: [end of test] number of elements 1`] = `0`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests two-finger scroll works: [end of test] number of renders 1`] = `9`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests undo/redo drawing an element: [end of test] appState 1`] = `
|
|
|
|
+Object {
|
|
|
|
+ "collaborators": Map {},
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "cursorX": 0,
|
|
|
|
+ "cursorY": 0,
|
|
|
|
+ "draggingElement": null,
|
|
|
|
+ "editingElement": null,
|
|
|
|
+ "elementLocked": false,
|
|
|
|
+ "elementType": "selection",
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "isCollaborating": false,
|
|
|
|
+ "isResizing": false,
|
|
|
|
+ "lastPointerDownWith": "mouse",
|
|
|
|
+ "multiElement": null,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "openMenu": null,
|
|
|
|
+ "resizingElement": null,
|
|
|
|
+ "scrollX": 0,
|
|
|
|
+ "scrollY": 0,
|
|
|
|
+ "scrolledOutside": false,
|
|
|
|
+ "selectedElementIds": Object {
|
|
|
|
+ "id2": true,
|
|
|
|
+ },
|
|
|
|
+ "selectionElement": null,
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ "zoom": 1,
|
|
|
|
+}
|
|
|
|
+`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests undo/redo drawing an element: [end of test] element 0 1`] = `
|
|
|
|
+Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 3,
|
|
|
|
+ "versionNonce": 1278240551,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+}
|
|
|
|
+`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests undo/redo drawing an element: [end of test] element 1 1`] = `
|
|
|
|
+Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id1",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 453191,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 3,
|
|
|
|
+ "versionNonce": 401146281,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 30,
|
|
|
|
+ "y": 10,
|
|
|
|
+}
|
|
|
|
+`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests undo/redo drawing an element: [end of test] element 2 1`] = `
|
|
|
|
+Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id2",
|
|
|
|
+ "isDeleted": true,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 1116226695,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 5,
|
|
|
|
+ "versionNonce": 1006504105,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 50,
|
|
|
|
+ "y": 10,
|
|
|
|
+}
|
|
|
|
+`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests undo/redo drawing an element: [end of test] history 1`] = `
|
|
|
|
+Object {
|
|
|
|
+ "recording": false,
|
|
|
|
+ "redoStack": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 3,
|
|
|
|
+ "versionNonce": 1278240551,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id1",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 453191,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 3,
|
|
|
|
+ "versionNonce": 401146281,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 30,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id2",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 1116226695,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 3,
|
|
|
|
+ "versionNonce": 1014066025,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 50,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ "stateHistory": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 3,
|
|
|
|
+ "versionNonce": 1278240551,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "appState": Object {
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ },
|
|
|
|
+ "elements": Array [
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id0",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 337897,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 3,
|
|
|
|
+ "versionNonce": 1278240551,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ Object {
|
|
|
|
+ "backgroundColor": "transparent",
|
|
|
|
+ "fillStyle": "hachure",
|
|
|
|
+ "height": 10,
|
|
|
|
+ "id": "id1",
|
|
|
|
+ "isDeleted": false,
|
|
|
|
+ "opacity": 100,
|
|
|
|
+ "roughness": 1,
|
|
|
|
+ "seed": 453191,
|
|
|
|
+ "strokeColor": "#000000",
|
|
|
|
+ "strokeWidth": 1,
|
|
|
|
+ "type": "rectangle",
|
|
|
|
+ "version": 3,
|
|
|
|
+ "versionNonce": 401146281,
|
|
|
|
+ "width": 10,
|
|
|
|
+ "x": 30,
|
|
|
|
+ "y": 10,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+}
|
|
|
|
+`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests undo/redo drawing an element: [end of test] number of elements 1`] = `3`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests undo/redo drawing an element: [end of test] number of renders 1`] = `16`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests zoom hotkeys: [end of test] appState 1`] = `
|
|
|
|
+Object {
|
|
|
|
+ "collaborators": Map {},
|
|
|
|
+ "currentItemBackgroundColor": "transparent",
|
|
|
|
+ "currentItemFillStyle": "hachure",
|
|
|
|
+ "currentItemFont": "20px Virgil",
|
|
|
|
+ "currentItemOpacity": 100,
|
|
|
|
+ "currentItemRoughness": 1,
|
|
|
|
+ "currentItemStrokeColor": "#000000",
|
|
|
|
+ "currentItemStrokeWidth": 1,
|
|
|
|
+ "cursorX": 0,
|
|
|
|
+ "cursorY": 0,
|
|
|
|
+ "draggingElement": null,
|
|
|
|
+ "editingElement": null,
|
|
|
|
+ "elementLocked": false,
|
|
|
|
+ "elementType": "selection",
|
|
|
|
+ "exportBackground": true,
|
|
|
|
+ "isCollaborating": false,
|
|
|
|
+ "isResizing": false,
|
|
|
|
+ "lastPointerDownWith": "mouse",
|
|
|
|
+ "multiElement": null,
|
|
|
|
+ "name": "excalidraw-201933152653",
|
|
|
|
+ "openMenu": null,
|
|
|
|
+ "resizingElement": null,
|
|
|
|
+ "scrollX": 0,
|
|
|
|
+ "scrollY": 0,
|
|
|
|
+ "scrolledOutside": false,
|
|
|
|
+ "selectedElementIds": Object {},
|
|
|
|
+ "selectionElement": null,
|
|
|
|
+ "viewBackgroundColor": "#ffffff",
|
|
|
|
+ "zoom": 1,
|
|
|
|
+}
|
|
|
|
+`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests zoom hotkeys: [end of test] history 1`] = `
|
|
|
|
+Object {
|
|
|
|
+ "recording": false,
|
|
|
|
+ "redoStack": Array [],
|
|
|
|
+ "stateHistory": Array [],
|
|
|
|
+}
|
|
|
|
+`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests zoom hotkeys: [end of test] number of elements 1`] = `0`;
|
|
|
|
+
|
|
|
|
+exports[`regression tests zoom hotkeys: [end of test] number of renders 1`] = `3`;
|