Skip to content

Virtual whiteboard for sketching hand-drawn like diagrams

fix: add history capture for paste and drop of images and embeds (#9605)

Marcel Mraz0d4abd1ddc9b
diff --git a/packages/excalidraw/components/App.tsx b/packages/excalidraw/components/App.tsx
index c6231415a2..8aa87b62bd 100644
--- a/packages/excalidraw/components/App.tsx
+++ b/packages/excalidraw/components/App.tsx
@@ -3006,6 +3006,7 @@ class App extends React.Component<AppProps, AppState> {
}
};
+ // TODO: this is so spaghetti, we should refactor it and cover it with tests
public pasteFromClipboard = withBatchedUpdates(
async (event: ClipboardEvent) => {
const isPlainPaste = !!IS_PLAIN_PASTE;
@@ -3070,6 +3071,7 @@ class App extends React.Component<AppProps, AppState> {
const imageElement = this.createImageElement({ sceneX, sceneY });
this.insertImageElement(imageElement, file);
this.initializeImageDimensions(imageElement);
+ this.store.scheduleCapture();
this.setState({
selectedElementIds: makeNextSelectedElementIds(
{
@@ -3180,6 +3182,7 @@ class App extends React.Component<AppProps, AppState> {
}
}
if (embeddables.length) {
+ this.store.scheduleCapture();
this.setState({
selectedElementIds: Object.fromEntries(
embeddables.map((embeddable) => [embeddable.id, true]),
@@ -3292,11 +3295,10 @@ class App extends React.Component<AppProps, AppState> {
this.addMissingFiles(opts.files);
}
- this.store.scheduleCapture();
-
const nextElementsToSelect =
excludeElementsInFramesFromSelection(duplicatedElements);
+ this.store.scheduleCapture();
this.setState(
{
...this.state,
@@ -3530,7 +3532,7 @@ class App extends React.Component<AppProps, AppState> {
}
this.scene.insertElements(textElements);
-
+ this.store.scheduleCapture();
this.setState({
selectedElementIds: makeNextSelectedElementIds(
Object.fromEntries(textElements.map((el) => [el.id, true])),
@@ -3552,8 +3554,6 @@ class App extends React.Component<AppProps, AppState> {
});
PLAIN_PASTE_TOAST_SHOWN = true;
}
-
- this.store.scheduleCapture();
}
setAppState: React.Component<any, AppState>["setState"] = (
@@ -8978,6 +8978,7 @@ class App extends React.Component<AppProps, AppState> {
);
this.store.scheduleCapture();
+
if (hitLockedElement?.locked) {
this.setState({
activeLockedId:
@@ -9947,13 +9948,9 @@ class App extends React.Component<AppProps, AppState> {
const dataURL =
this.files[fileId]?.dataURL || (await getDataURL(imageFile));
- const imageElement = this.scene.mutateElement(
- _imageElement,
- {
- fileId,
- },
- { informMutation: false, isDragging: false },
- ) as NonDeleted<InitializedExcalidrawImageElement>;
+ let imageElement = newElementWith(_imageElement, {
+ fileId,
+ }) as NonDeleted<InitializedExcalidrawImageElement>;
return new Promise<NonDeleted<InitializedExcalidrawImageElement>>(
async (resolve, reject) => {
@@ -9967,20 +9964,38 @@ class App extends React.Component<AppProps, AppState> {
lastRetrieved: Date.now(),
},
]);
- const cachedImageData = this.imageCache.get(fileId);
+
+ let cachedImageData = this.imageCache.get(fileId);
+
if (!cachedImageData) {
this.addNewImagesToImageCache();
- await this.updateImageCache([imageElement]);
- }
- if (cachedImageData?.image instanceof Promise) {
- await cachedImageData.image;
+
+ const { updatedFiles } = await this.updateImageCache([
+ imageElement,
+ ]);
+
+ if (updatedFiles.size) {
+ ShapeCache.delete(_imageElement);
+ }
+
+ cachedImageData = this.imageCache.get(fileId);
}
+
+ const imageHTML = await cachedImageData?.image;
+
if (
+ imageHTML &&
this.state.pendingImageElementId !== imageElement.id &&
this.state.newElement?.id !== imageElement.id
) {
- this.initializeImageDimensions(imageElement, true);
+ const naturalDimensions = this.getImageNaturalDimensions(
+ imageElement,
+ imageHTML,
+ );
+
+ imageElement = newElementWith(imageElement, naturalDimensions);
}
+
resolve(imageElement);
} catch (error: any) {
console.error(error);
@@ -10012,11 +10027,30 @@ class App extends React.Component<AppProps, AppState> {
this.scene.insertElement(imageElement);
try {
- return await this.initializeImage({
+ const image = await this.initializeImage({
imageFile,
imageElement,
showCursorImagePreview,
});
+
+ const nextElements = this.scene
+ .getElementsIncludingDeleted()
+ .map((element) => {
+ if (element.id === image.id) {
+ return image;
+ }
+
+ return element;
+ });
+
+ // schedules an immediate micro action, which will update snapshot,
+ // but won't be undoable, which is what we want!
+ this.updateScene({
+ captureUpdate: CaptureUpdateAction.NEVER,
+ elements: nextElements,
+ });
+
+ return image;
} catch (error: any) {
this.scene.mutateElement(imageElement, {
isDeleted: true,
@@ -10106,6 +10140,7 @@ class App extends React.Component<AppProps, AppState> {
if (insertOnCanvasDirectly) {
this.insertImageElement(imageElement, imageFile);
this.initializeImageDimensions(imageElement);
+ this.store.scheduleCapture();
this.setState(
{
selectedElementIds: makeNextSelectedElementIds(
@@ -10150,20 +10185,18 @@ class App extends React.Component<AppProps, AppState> {
}
};
- initializeImageDimensions = (
- imageElement: ExcalidrawImageElement,
- forceNaturalSize = false,
- ) => {
- const image =
+ initializeImageDimensions = (imageElement: ExcalidrawImageElement) => {
+ const imageHTML =
isInitializedImageElement(imageElement) &&
this.imageCache.get(imageElement.fileId)?.image;
- if (!image || image instanceof Promise) {
+ if (!imageHTML || imageHTML instanceof Promise) {
if (
imageElement.width < DRAGGING_THRESHOLD / this.state.zoom.value &&
imageElement.height < DRAGGING_THRESHOLD / this.state.zoom.value
) {
const placeholderSize = 100 / this.state.zoom.value;
+
this.scene.mutateElement(imageElement, {
x: imageElement.x - placeholderSize / 2,
y: imageElement.y - placeholderSize / 2,
@@ -10175,37 +10208,48 @@ class App extends React.Component<AppProps, AppState> {
return;
}
+ // if user-created bounding box is below threshold, assume the
+ // intention was to click instead of drag, and use the image's
+ // intrinsic size
if (
- forceNaturalSize ||
- // if user-created bounding box is below threshold, assume the
- // intention was to click instead of drag, and use the image's
- // intrinsic size
- (imageElement.width < DRAGGING_THRESHOLD / this.state.zoom.value &&
- imageElement.height < DRAGGING_THRESHOLD / this.state.zoom.value)
+ imageElement.width < DRAGGING_THRESHOLD / this.state.zoom.value &&
+ imageElement.height < DRAGGING_THRESHOLD / this.state.zoom.value
) {
- const minHeight = Math.max(this.state.height - 120, 160);
- // max 65% of canvas height, clamped to <300px, vh - 120px>
- const maxHeight = Math.min(
- minHeight,
- Math.floor(this.state.height * 0.5) / this.state.zoom.value,
+ const naturalDimensions = this.getImageNaturalDimensions(
+ imageElement,
+ imageHTML,
);
- const height = Math.min(image.naturalHeight, maxHeight);
- const width = height * (image.naturalWidth / image.naturalHeight);
+ this.scene.mutateElement(imageElement, naturalDimensions);
+ }
+ };
+
+ private getImageNaturalDimensions = (
+ imageElement: ExcalidrawImageElement,
+ imageHTML: HTMLImageElement,
+ ) => {
+ const minHeight = Math.max(this.state.height - 120, 160);
+ // max 65% of canvas height, clamped to <300px, vh - 120px>
+ const maxHeight = Math.min(
+ minHeight,
+ Math.floor(this.state.height * 0.5) / this.state.zoom.value,
+ );
+
+ const height = Math.min(imageHTML.naturalHeight, maxHeight);
+ const width = height * (imageHTML.naturalWidth / imageHTML.naturalHeight);
- // add current imageElement width/height to account for previous centering
- // of the placeholder image
- const x = imageElement.x + imageElement.width / 2 - width / 2;
- const y = imageElement.y + imageElement.height / 2 - height / 2;
+ // add current imageElement width/height to account for previous centering
+ // of the placeholder image
+ const x = imageElement.x + imageElement.width / 2 - width / 2;
+ const y = imageElement.y + imageElement.height / 2 - height / 2;
- this.scene.mutateElement(imageElement, {
- x,
- y,
- width,
- height,
- crop: null,
- });
- }
+ return {
+ x,
+ y,
+ width,
+ height,
+ crop: null,
+ };
};
/** updates image cache, refreshing updated elements and/or setting status
@@ -10219,13 +10263,7 @@ class App extends React.Component<AppProps, AppState> {
fileIds: elements.map((element) => element.fileId),
files,
});
- if (updatedFiles.size || erroredFiles.size) {
- for (const element of elements) {
- if (updatedFiles.has(element.fileId)) {
- ShapeCache.delete(element);
- }
- }
- }
+
if (erroredFiles.size) {
this.scene.replaceAllElements(
this.scene.getElementsIncludingDeleted().map((element) => {
@@ -10261,6 +10299,15 @@ class App extends React.Component<AppProps, AppState> {
uncachedImageElements,
files,
);
+
+ if (updatedFiles.size) {
+ for (const element of uncachedImageElements) {
+ if (updatedFiles.has(element.fileId)) {
+ ShapeCache.delete(element);
+ }
+ }
+ }
+
if (updatedFiles.size) {
this.scene.triggerUpdate();
}
@@ -10444,6 +10491,7 @@ class App extends React.Component<AppProps, AppState> {
const imageElement = this.createImageElement({ sceneX, sceneY });
this.insertImageElement(imageElement, file);
this.initializeImageDimensions(imageElement);
+ this.store.scheduleCapture();
this.setState({
selectedElementIds: makeNextSelectedElementIds(
{ [imageElement.id]: true },
@@ -10494,6 +10542,7 @@ class App extends React.Component<AppProps, AppState> {
link: normalizeLink(text),
});
if (embeddable) {
+ this.store.scheduleCapture();
this.setState({ selectedElementIds: { [embeddable.id]: true } });
}
}
diff --git a/packages/excalidraw/tests/__snapshots__/history.test.tsx.snap b/packages/excalidraw/tests/__snapshots__/history.test.tsx.snap
index 191add45d8..ed4ef54ce4 100644
--- a/packages/excalidraw/tests/__snapshots__/history.test.tsx.snap
+++ b/packages/excalidraw/tests/__snapshots__/history.test.tsx.snap
@@ -81,14 +81,14 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl
"penMode": false,
"pendingImageElementId": null,
"previousSelectedElementIds": {
- "id691": true,
+ "id4": true,
},
"resizingElement": null,
"scrollX": 0,
"scrollY": 0,
"searchMatches": null,
"selectedElementIds": {
- "id691": true,
+ "id4": true,
},
"selectedElementsAreBeingDragged": false,
"selectedGroupIds": {},
@@ -126,7 +126,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl
"frameId": null,
"groupIds": [],
"height": 100,
- "id": "id687",
+ "id": "id0",
"index": "a0",
"isDeleted": false,
"link": null,
@@ -156,7 +156,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl
"frameId": null,
"groupIds": [],
"height": 100,
- "id": "id688",
+ "id": "id1",
"index": "a1",
"isDeleted": false,
"link": null,
@@ -185,7 +185,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl
"elbowed": false,
"endArrowhead": "arrow",
"endBinding": {
- "elementId": "id702",
+ "elementId": "id15",
"fixedPoint": [
"0.50000",
1,
@@ -197,7 +197,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl
"frameId": null,
"groupIds": [],
"height": "99.19972",
- "id": "id691",
+ "id": "id4",
"index": "a2",
"isDeleted": false,
"lastCommittedPoint": null,
@@ -238,7 +238,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl
"backgroundColor": "transparent",
"boundElements": [
{
- "id": "id691",
+ "id": "id4",
"type": "arrow",
},
],
@@ -247,7 +247,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl
"frameId": null,
"groupIds": [],
"height": 50,
- "id": "id702",
+ "id": "id15",
"index": "a3",
"isDeleted": false,
"link": null,
@@ -284,7 +284,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl
"added": {},
"removed": {},
"updated": {
- "id687": {
+ "id0": {
"deleted": {
"version": 17,
},
@@ -292,7 +292,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl
"version": 15,
},
},
- "id688": {
+ "id1": {
"deleted": {
"boundElements": [],
"version": 9,
@@ -300,17 +300,32 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl
"inserted": {
"boundElements": [
{
- "id": "id691",
+ "id": "id4",
"type": "arrow",
},
],
"version": 8,
},
},
- "id691": {
+ "id15": {
+ "deleted": {
+ "boundElements": [
+ {
+ "id": "id4",
+ "type": "arrow",
+ },
+ ],
+ "version": 12,
+ },
+ "inserted": {
+ "boundElements": [],
+ "version": 11,
+ },
+ },
+ "id4": {
"deleted": {
"endBinding": {
- "elementId": "id702",
+ "elementId": "id15",
"fixedPoint": [
"0.50000",
1,
@@ -330,7 +345,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl
],
],
"startBinding": {
- "elementId": "id687",
+ "elementId": "id0",
"focus": "0.02970",
"gap": 1,
},
@@ -338,7 +353,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl
},
"inserted": {
"endBinding": {
- "elementId": "id688",
+ "elementId": "id1",
"focus": "-0.02000",
"gap": 1,
},
@@ -354,31 +369,16 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl
],
],
"startBinding": {
- "elementId": "id687",
+ "elementId": "id0",
"focus": "0.02000",
"gap": 1,
},
"version": 32,
},
},
- "id702": {
- "deleted": {
- "boundElements": [
- {
- "id": "id691",
- "type": "arrow",
- },
- ],
- "version": 12,
- },
- "inserted": {
- "boundElements": [],
- "version": 11,
- },
- },
},
},
- "id": "id709",
+ "id": "id22",
},
{
"appState": AppStateDelta {
@@ -391,7 +391,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl
"added": {},
"removed": {},
"updated": {
- "id687": {
+ "id0": {
"deleted": {
"boundElements": [],
"version": 18,
@@ -399,14 +399,22 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl
"inserted": {
"boundElements": [
{
- "id": "id691",
+ "id": "id4",
"type": "arrow",
},
],
"version": 17,
},
},
- "id691": {
+ "id15": {
+ "deleted": {
+ "version": 14,
+ },
+ "inserted": {
+ "version": 12,
+ },
+ },
+ "id4": {
"deleted": {
"height": "99.19972",
"points": [
@@ -436,7 +444,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl
],
],
"startBinding": {
- "elementId": "id687",
+ "elementId": "id0",
"focus": "0.02970",
"gap": 1,
},
@@ -444,17 +452,9 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl
"y": "35.82151",
},
},
- "id702": {
- "deleted": {
- "version": 14,
- },
- "inserted": {
- "version": 12,
- },
- },
},
},
- "id": "id710",
+ "id": "id23",
},
]
`;
@@ -471,7 +471,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl
"elements": {
"added": {},
"removed": {
- "id687": {
+ "id0": {
"deleted": {
"angle": 0,
"backgroundColor": "transparent",
@@ -502,7 +502,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl
"version": 1,
},
},
- "id688": {
+ "id1": {
"deleted": {
"angle": 0,
"backgroundColor": "transparent",
@@ -536,16 +536,16 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl
},
"updated": {},
},
- "id": "id690",
+ "id": "id3",
},
{
"appState": AppStateDelta {
"delta": Delta {
"deleted": {
"selectedElementIds": {
- "id691": true,
+ "id4": true,
},
- "selectedLinearElementId": "id691",
+ "selectedLinearElementId": "id4",
},
"inserted": {
"selectedElementIds": {},
@@ -556,7 +556,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl
"elements": {
"added": {},
"removed": {
- "id691": {
+ "id4": {
"deleted": {
"angle": 0,
"backgroundColor": "transparent",
@@ -608,7 +608,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl
},
"updated": {},
},
- "id": "id693",
+ "id": "id6",
},
]
`;
@@ -694,14 +694,14 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl
"penMode": false,
"pendingImageElementId": null,
"previousSelectedElementIds": {
- "id668": true,
+ "id4": true,
},
"resizingElement": null,
"scrollX": 0,
"scrollY": 0,
"searchMatches": null,
"selectedElementIds": {
- "id668": true,
+ "id4": true,
},
"selectedElementsAreBeingDragged": false,
"selectedGroupIds": {},
@@ -739,7 +739,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl
"frameId": null,
"groupIds": [],
"height": 100,
- "id": "id664",
+ "id": "id0",
"index": "a0",
"isDeleted": false,
"link": null,
@@ -769,7 +769,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl
"frameId": null,
"groupIds": [],
"height": 100,
- "id": "id665",
+ "id": "id1",
"index": "a1",
"isDeleted": false,
"link": null,
@@ -802,7 +802,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl
"frameId": null,
"groupIds": [],
"height": 0,
- "id": "id668",
+ "id": "id4",
"index": "a2",
"isDeleted": false,
"lastCommittedPoint": null,
@@ -854,7 +854,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl
"added": {},
"removed": {},
"updated": {
- "id664": {
+ "id0": {
"deleted": {
"version": 18,
},
@@ -862,7 +862,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl
"version": 16,
},
},
- "id665": {
+ "id1": {
"deleted": {
"boundElements": [],
"version": 9,
@@ -870,21 +870,21 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl
"inserted": {
"boundElements": [
{
- "id": "id668",
+ "id": "id4",
"type": "arrow",
},
],
"version": 8,
},
},
- "id668": {
+ "id4": {
"deleted": {
"endBinding": null,
"version": 32,
},
"inserted": {
"endBinding": {
- "elementId": "id665",
+ "elementId": "id1",
"focus": -0,
"gap": 1,
},
@@ -893,7 +893,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl
},
},
},
- "id": "id685",
+ "id": "id21",
},
{
"appState": AppStateDelta {
@@ -906,7 +906,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl
"added": {},
"removed": {},
"updated": {
- "id664": {
+ "id0": {
"deleted": {
"boundElements": [],
"version": 19,
@@ -914,21 +914,21 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl
"inserted": {
"boundElements": [
{
- "id": "id668",
+ "id": "id4",
"type": "arrow",
},
],
"version": 18,
},
},
- "id668": {
+ "id4": {
"deleted": {
"startBinding": null,
"version": 33,
},
"inserted": {
"startBinding": {
- "elementId": "id664",
+ "elementId": "id0",
"focus": 0,
"gap": 1,
},
@@ -937,7 +937,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl
},
},
},
- "id": "id686",
+ "id": "id22",
},
]
`;
@@ -954,7 +954,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl
"elements": {
"added": {},
"removed": {
- "id664": {
+ "id0": {
"deleted": {
"angle": 0,
"backgroundColor": "transparent",
@@ -985,7 +985,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl
"version": 1,
},
},
- "id665": {
+ "id1": {
"deleted": {
"angle": 0,
"backgroundColor": "transparent",
@@ -1019,16 +1019,16 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl
},
"updated": {},
},
- "id": "id667",
+ "id": "id3",
},
{
"appState": AppStateDelta {
"delta": Delta {
"deleted": {
"selectedElementIds": {
- "id668": true,
+ "id4": true,
},
- "selectedLinearElementId": "id668",
+ "selectedLinearElementId": "id4",
},
"inserted": {
"selectedElementIds": {},
@@ -1039,7 +1039,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl
"elements": {
"added": {},
"removed": {
- "id668": {
+ "id4": {
"deleted": {
"angle": 0,
"backgroundColor": "transparent",
@@ -1091,7 +1091,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl
},
"updated": {},
},
- "id": "id670",
+ "id": "id6",
},
]
`;
@@ -1220,7 +1220,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl
"elbowed": false,
"endArrowhead": null,
"endBinding": {
- "elementId": "id712",
+ "elementId": "id1",
"fixedPoint": [
"0.50000",
1,
@@ -1232,7 +1232,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl
"frameId": null,
"groupIds": [],
"height": "1.36342",
- "id": "id715",
+ "id": "id4",
"index": "Zz",
"isDeleted": false,
"lastCommittedPoint": null,
@@ -1253,7 +1253,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl
"roundness": null,
"startArrowhead": null,
"startBinding": {
- "elementId": "id711",
+ "elementId": "id0",
"fixedPoint": [
1,
"0.50000",
@@ -1279,7 +1279,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl
"backgroundColor": "transparent",
"boundElements": [
{
- "id": "id715",
+ "id": "id4",
"type": "arrow",
},
],
@@ -1288,7 +1288,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl
"frameId": null,
"groupIds": [],
"height": 100,
- "id": "id711",
+ "id": "id0",
"index": "a0",
"isDeleted": false,
"link": null,
@@ -1314,7 +1314,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl
"backgroundColor": "transparent",
"boundElements": [
{
- "id": "id715",
+ "id": "id4",
"type": "arrow",
},
],
@@ -1323,7 +1323,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl
"frameId": null,
"groupIds": [],
"height": 100,
- "id": "id712",
+ "id": "id1",
"index": "a1",
"isDeleted": false,
"link": null,
@@ -1361,7 +1361,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl
"elements": {
"added": {},
"removed": {
- "id711": {
+ "id0": {
"deleted": {
"angle": 0,
"backgroundColor": "transparent",
@@ -1392,7 +1392,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl
"version": 6,
},
},
- "id712": {
+ "id1": {
"deleted": {
"angle": 0,
"backgroundColor": "transparent",
@@ -1425,10 +1425,10 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl
},
},
"updated": {
- "id715": {
+ "id4": {
"deleted": {
"endBinding": {
- "elementId": "id712",
+ "elementId": "id1",
"fixedPoint": [
"0.50000",
1,
@@ -1437,7 +1437,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl
"gap": 1,
},
"startBinding": {
- "elementId": "id711",
+ "elementId": "id0",
"fixedPoint": [
1,
"0.50000",
@@ -1455,7 +1455,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl
},
},
},
- "id": "id719",
+ "id": "id8",
},
]
`;
@@ -1584,7 +1584,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl
"elbowed": false,
"endArrowhead": null,
"endBinding": {
- "elementId": "id721",
+ "elementId": "id1",
"fixedPoint": [
1,
"0.50000",
@@ -1596,7 +1596,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl
"frameId": null,
"groupIds": [],
"height": "1.36342",
- "id": "id725",
+ "id": "id5",
"index": "a0",
"isDeleted": false,
"lastCommittedPoint": null,
@@ -1617,7 +1617,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl
"roundness": null,
"startArrowhead": null,
"startBinding": {
- "elementId": "id720",
+ "elementId": "id0",
"fixedPoint": [
"0.50000",
1,
@@ -1643,7 +1643,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl
"backgroundColor": "transparent",
"boundElements": [
{
- "id": "id725",
+ "id": "id5",
"type": "arrow",
},
],
@@ -1652,7 +1652,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl
"frameId": null,
"groupIds": [],
"height": 100,
- "id": "id720",
+ "id": "id0",
"index": "a0V",
"isDeleted": false,
"link": null,
@@ -1678,7 +1678,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl
"backgroundColor": "transparent",
"boundElements": [
{
- "id": "id725",
+ "id": "id5",
"type": "arrow",
},
],
@@ -1687,7 +1687,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl
"frameId": null,
"groupIds": [],
"height": 100,
- "id": "id721",
+ "id": "id1",
"index": "a1",
"isDeleted": false,
"link": null,
@@ -1725,7 +1725,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl
"elements": {
"added": {},
"removed": {
- "id725": {
+ "id5": {
"deleted": {
"angle": 0,
"backgroundColor": "transparent",
@@ -1734,7 +1734,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl
"elbowed": false,
"endArrowhead": null,
"endBinding": {
- "elementId": "id721",
+ "elementId": "id1",
"fixedPoint": [
1,
"0.50000",
@@ -1766,7 +1766,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl
"roundness": null,
"startArrowhead": null,
"startBinding": {
- "elementId": "id720",
+ "elementId": "id0",
"fixedPoint": [
"0.50000",
1,
@@ -1790,11 +1790,11 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl
},
},
"updated": {
- "id720": {
+ "id0": {
"deleted": {
"boundElements": [
{
- "id": "id725",
+ "id": "id5",
"type": "arrow",
},
],
@@ -1805,11 +1805,11 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl
"version": 9,
},
},
- "id721": {
+ "id1": {
"deleted": {
"boundElements": [
{
- "id": "id725",
+ "id": "id5",
"type": "arrow",
},
],
@@ -1822,7 +1822,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl
},
},
},
- "id": "id731",
+ "id": "id11",
},
]
`;
@@ -1952,7 +1952,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl
"frameId": null,
"groupIds": [],
"height": 100,
- "id": "id732",
+ "id": "id0",
"index": "a0",
"isDeleted": false,
"link": null,
@@ -1982,7 +1982,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl
"frameId": null,
"groupIds": [],
"height": 100,
- "id": "id733",
+ "id": "id1",
"index": "a1",
"isDeleted": false,
"link": null,
@@ -2020,7 +2020,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl
"elements": {
"added": {},
"removed": {
- "id732": {
+ "id0": {
"deleted": {
"angle": 0,
"backgroundColor": "transparent",
@@ -2051,7 +2051,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl
"version": 1,
},
},
- "id733": {
+ "id1": {
"deleted": {
"angle": 0,
"backgroundColor": "transparent",
@@ -2085,7 +2085,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl
},
"updated": {},
},
- "id": "id735",
+ "id": "id3",
},
]
`;
@@ -2176,7 +2176,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl
"scrollY": 0,
"searchMatches": null,
"selectedElementIds": {
- "id740": true,
+ "id4": true,
},
"selectedElementsAreBeingDragged": false,
"selectedGroupIds": {},
@@ -2210,7 +2210,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl
"backgroundColor": "transparent",
"boundElements": [
{
- "id": "id740",
+ "id": "id4",
"type": "arrow",
},
],
@@ -2219,7 +2219,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl
"frameId": null,
"groupIds": [],
"height": 100,
- "id": "id736",
+ "id": "id0",
"index": "a0",
"isDeleted": false,
"link": null,
@@ -2245,7 +2245,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl
"backgroundColor": "transparent",
"boundElements": [
{
- "id": "id740",
+ "id": "id4",
"type": "arrow",
},
],
@@ -2254,7 +2254,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl
"frameId": null,
"groupIds": [],
"height": 100,
- "id": "id737",
+ "id": "id1",
"index": "a1",
"isDeleted": false,
"link": null,
@@ -2283,7 +2283,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl
"elbowed": false,
"endArrowhead": "arrow",
"endBinding": {
- "elementId": "id737",
+ "elementId": "id1",
"focus": -0,
"gap": 1,
},
@@ -2291,7 +2291,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl
"frameId": null,
"groupIds": [],
"height": "370.26975",
- "id": "id740",
+ "id": "id4",
"index": "a2",
"isDeleted": false,
"lastCommittedPoint": null,
@@ -2314,7 +2314,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl
},
"startArrowhead": null,
"startBinding": {
- "elementId": "id736",
+ "elementId": "id0",
"focus": 0,
"gap": 1,
},
@@ -2348,7 +2348,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl
"elements": {
"added": {},
"removed": {
- "id736": {
+ "id0": {
"deleted": {
"angle": 0,
"backgroundColor": "transparent",
@@ -2379,7 +2379,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl
"version": 1,
},
},
- "id737": {
+ "id1": {
"deleted": {
"angle": 0,
"backgroundColor": "transparent",
@@ -2413,16 +2413,16 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl
},
"updated": {},
},
- "id": "id739",
+ "id": "id3",
},
{
"appState": AppStateDelta {
"delta": Delta {
"deleted": {
"selectedElementIds": {
- "id740": true,
+ "id4": true,
},
- "selectedLinearElementId": "id740",
+ "selectedLinearElementId": "id4",
},
"inserted": {
"selectedElementIds": {},
@@ -2433,7 +2433,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl
"elements": {
"added": {},
"removed": {
- "id740": {
+ "id4": {
"deleted": {
"angle": 0,
"backgroundColor": "transparent",
@@ -2442,7 +2442,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl
"elbowed": false,
"endArrowhead": "arrow",
"endBinding": {
- "elementId": "id737",
+ "elementId": "id1",
"focus": -0,
"gap": 1,
},
@@ -2472,7 +2472,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl
},
"startArrowhead": null,
"startBinding": {
- "elementId": "id736",
+ "elementId": "id0",
"focus": 0,
"gap": 1,
},
@@ -2492,11 +2492,11 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl
},
},
"updated": {
- "id736": {
+ "id0": {
"deleted": {
"boundElements": [
{
- "id": "id740",
+ "id": "id4",
"type": "arrow",
},
],
@@ -2507,11 +2507,11 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl
"version": 4,
},
},
- "id737": {
+ "id1": {
"deleted": {
"boundElements": [
{
- "id": "id740",
+ "id": "id4",
"type": "arrow",
},
],
@@ -2524,7 +2524,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl
},
},
},
- "id": "id744",
+ "id": "id8",
},
]
`;
@@ -2650,7 +2650,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and
"backgroundColor": "transparent",
"boundElements": [
{
- "id": "id618",
+ "id": "id5",
"type": "text",
},
],
@@ -2659,7 +2659,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and
"frameId": null,
"groupIds": [],
"height": 100,
- "id": "id613",
+ "id": "id0",
"index": "a0",
"isDeleted": false,
"link": null,
@@ -2693,7 +2693,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and
"frameId": null,
"groupIds": [],
"height": 100,
- "id": "id614",
+ "id": "id1",
"index": "a1",
"isDeleted": false,
"lineHeight": "1.25000",
@@ -2724,7 +2724,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and
"autoResize": true,
"backgroundColor": "transparent",
"boundElements": null,
- "containerId": "id613",
+ "containerId": "id0",
"customData": undefined,
"fillStyle": "solid",
"fontFamily": 5,
@@ -2732,7 +2732,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and
"frameId": null,
"groupIds": [],
"height": 25,
- "id": "id618",
+ "id": "id5",
"index": "a2",
"isDeleted": false,
"lineHeight": "1.25000",
@@ -2774,7 +2774,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and
"added": {},
"removed": {},
"updated": {
- "id618": {
+ "id5": {
"deleted": {
"version": 7,
},
@@ -2784,7 +2784,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and
},
},
},
- "id": "id622",
+ "id": "id9",
},
]
`;
@@ -2912,7 +2912,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and
"backgroundColor": "transparent",
"boundElements": [
{
- "id": "id628",
+ "id": "id5",
"type": "text",
},
],
@@ -2921,7 +2921,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and
"frameId": null,
"groupIds": [],
"height": 100,
- "id": "id623",
+ "id": "id0",
"index": "Zz",
"isDeleted": false,
"link": null,
@@ -2947,7 +2947,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and
"autoResize": true,
"backgroundColor": "transparent",
"boundElements": null,
- "containerId": "id623",
+ "containerId": "id0",
"customData": undefined,
"fillStyle": "solid",
"fontFamily": 5,
@@ -2955,7 +2955,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and
"frameId": null,
"groupIds": [],
"height": 100,
- "id": "id624",
+ "id": "id1",
"index": "a0",
"isDeleted": true,
"lineHeight": "1.25000",
@@ -2986,7 +2986,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and
"autoResize": true,
"backgroundColor": "transparent",
"boundElements": null,
- "containerId": "id623",
+ "containerId": "id0",
"customData": undefined,
"fillStyle": "solid",
"fontFamily": 5,
@@ -2994,7 +2994,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and
"frameId": null,
"groupIds": [],
"height": 25,
- "id": "id628",
+ "id": "id5",
"index": "a1",
"isDeleted": false,
"lineHeight": "1.25000",
@@ -3034,9 +3034,9 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and
},
"elements": {
"added": {
- "id624": {
+ "id1": {
"deleted": {
- "containerId": "id623",
+ "containerId": "id0",
"isDeleted": true,
"version": 9,
},
@@ -3050,7 +3050,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and
"removed": {},
"updated": {},
},
- "id": "id632",
+ "id": "id9",
},
]
`;
@@ -3178,7 +3178,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and
"backgroundColor": "transparent",
"boundElements": [
{
- "id": "id582",
+ "id": "id5",
"type": "text",
},
],
@@ -3187,7 +3187,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and
"frameId": null,
"groupIds": [],
"height": 100,
- "id": "id577",
+ "id": "id0",
"index": "a0",
"isDeleted": false,
"link": null,
@@ -3213,7 +3213,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and
"autoResize": true,
"backgroundColor": "transparent",
"boundElements": null,
- "containerId": "id577",
+ "containerId": "id0",
"customData": undefined,
"fillStyle": "solid",
"fontFamily": 5,
@@ -3221,7 +3221,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and
"frameId": null,
"groupIds": [],
"height": 25,
- "id": "id582",
+ "id": "id5",
"index": "a0V",
"isDeleted": false,
"lineHeight": "1.25000",
@@ -3260,7 +3260,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and
"frameId": null,
"groupIds": [],
"height": 25,
- "id": "id578",
+ "id": "id1",
"index": "a1",
"isDeleted": false,
"lineHeight": "1.25000",
@@ -3302,11 +3302,11 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and
"added": {},
"removed": {},
"updated": {
- "id577": {
+ "id0": {
"deleted": {
"boundElements": [
{
- "id": "id582",
+ "id": "id5",
"type": "text",
},
],
@@ -3315,26 +3315,26 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and
"inserted": {
"boundElements": [
{
- "id": "id578",
+ "id": "id1",
"type": "text",
},
],
"version": 9,
},
},
- "id578": {
+ "id1": {
"deleted": {
"containerId": null,
"version": 9,
},
"inserted": {
- "containerId": "id577",
+ "containerId": "id0",
"version": 8,
},
},
- "id582": {
+ "id5": {
"deleted": {
- "containerId": "id577",
+ "containerId": "id0",
"version": 7,
},
"inserted": {
@@ -3344,7 +3344,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and
},
},
},
- "id": "id586",
+ "id": "id9",
},
]
`;
@@ -3476,7 +3476,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and
"frameId": null,
"groupIds": [],
"height": 100,
- "id": "id587",
+ "id": "id0",
"index": "a0",
"isDeleted": false,
"link": null,
@@ -3502,7 +3502,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and
"backgroundColor": "transparent",
"boundElements": [
{
- "id": "id588",
+ "id": "id1",
"type": "text",
},
],
@@ -3511,7 +3511,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and
"frameId": null,
"groupIds": [],
"height": 60,
- "id": "id592",
+ "id": "id5",
"index": "a0V",
"isDeleted": false,
"link": null,
@@ -3537,7 +3537,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and
"autoResize": true,
"backgroundColor": "transparent",
"boundElements": null,
- "containerId": "id592",
+ "containerId": "id5",
"customData": undefined,
"fillStyle": "solid",
"fontFamily": 5,
@@ -3545,7 +3545,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and
"frameId": null,
"groupIds": [],
"height": 50,
- "id": "id588",
+ "id": "id1",
"index": "a1",
"isDeleted": false,
"lineHeight": "1.25000",
@@ -3588,7 +3588,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and
"added": {},
"removed": {},
"updated": {
- "id587": {
+ "id0": {
"deleted": {
"boundElements": [],
"version": 8,
@@ -3596,28 +3596,28 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and
"inserted": {
"boundElements": [
{
- "id": "id588",
+ "id": "id1",
"type": "text",
},
],
"version": 7,
},
},
- "id588": {
+ "id1": {
"deleted": {
- "containerId": "id592",
+ "containerId": "id5",
"version": 13,
},
"inserted": {
- "containerId": "id587",
+ "containerId": "id0",
"version": 11,
},
},
- "id592": {
+ "id5": {
"deleted": {
"boundElements": [
{
- "id": "id588",
+ "id": "id1",
"type": "text",
},
],
@@ -3630,7 +3630,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and
},
},
},
- "id": "id596",
+ "id": "id9",
},
]
`;
@@ -3762,7 +3762,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and
"frameId": null,
"groupIds": [],
"height": 100,
- "id": "id568",
+ "id": "id0",
"index": "a0",
"isDeleted": false,
"link": null,
@@ -3796,7 +3796,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and
"frameId": null,
"groupIds": [],
"height": 25,
- "id": "id569",
+ "id": "id1",
"index": "a1",
"isDeleted": false,
"lineHeight": "1.25000",
@@ -3838,7 +3838,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and
"added": {},
"removed": {},
"updated": {
- "id568": {
+ "id0": {
"deleted": {
"boundElements": [],
"version": 9,
@@ -3846,26 +3846,26 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and
"inserted": {
"boundElements": [
{
- "id": "id569",
+ "id": "id1",
"type": "text",
},
],
"version": 8,
},
},
- "id569": {
+ "id1": {
"deleted": {
"containerId": null,
"version": 10,
},
"inserted": {
- "containerId": "id568",
+ "containerId": "id0",
"version": 9,
},
},
},
},
- "id": "id576",
+ "id": "id8",
},
]
`;
@@ -3993,7 +3993,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and
"backgroundColor": "transparent",
"boundElements": [
{
- "id": "id598",
+ "id": "id1",
"type": "text",
},
],
@@ -4002,7 +4002,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and
"frameId": null,
"groupIds": [],
"height": 100,
- "id": "id597",
+ "id": "id0",
"index": "a0",
"isDeleted": false,
"link": null,
@@ -4028,7 +4028,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and
"autoResize": true,
"backgroundColor": "transparent",
"boundElements": null,
- "containerId": "id597",
+ "containerId": "id0",
"customData": undefined,
"fillStyle": "solid",
"fontFamily": 5,
@@ -4036,7 +4036,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and
"frameId": null,
"groupIds": [],
"height": 25,
- "id": "id598",
+ "id": "id1",
"index": "a1",
"isDeleted": false,
"lineHeight": "1.25000",
@@ -4079,7 +4079,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and
"elements": {
"added": {},
"removed": {
- "id597": {
+ "id0": {
"deleted": {
"angle": 0,
"backgroundColor": "transparent",
@@ -4112,9 +4112,9 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and
},
},
"updated": {
- "id598": {
+ "id1": {
"deleted": {
- "containerId": "id597",
+ "containerId": "id0",
"version": 12,
},
"inserted": {
@@ -4124,7 +4124,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and
},
},
},
- "id": "id604",
+ "id": "id7",
},
]
`;
@@ -4250,7 +4250,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and
"backgroundColor": "transparent",
"boundElements": [
{
- "id": "id606",
+ "id": "id1",
"type": "text",
},
],
@@ -4259,7 +4259,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and
"frameId": null,
"groupIds": [],
"height": 100,
- "id": "id605",
+ "id": "id0",
"index": "Zz",
"isDeleted": false,
"link": null,
@@ -4285,7 +4285,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and
"autoResize": true,
"backgroundColor": "transparent",
"boundElements": null,
- "containerId": "id605",
+ "containerId": "id0",
"customData": undefined,
"fillStyle": "solid",
"fontFamily": 5,
@@ -4293,7 +4293,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and
"frameId": null,
"groupIds": [],
"height": 25,
- "id": "id606",
+ "id": "id1",
"index": "a0",
"isDeleted": false,
"lineHeight": "1.25000",
@@ -4336,13 +4336,13 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and
"elements": {
"added": {},
"removed": {
- "id606": {
+ "id1": {
"deleted": {
"angle": 0,
"autoResize": true,
"backgroundColor": "transparent",
"boundElements": null,
- "containerId": "id605",
+ "containerId": "id0",
"customData": undefined,
"fillStyle": "solid",
"fontFamily": 5,
@@ -4378,11 +4378,11 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and
},
},
"updated": {
- "id605": {
+ "id0": {
"deleted": {
"boundElements": [
{
- "id": "id606",
+ "id": "id1",
"type": "text",
},
],
@@ -4395,7 +4395,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and
},
},
},
- "id": "id612",
+ "id": "id7",
},
]
`;
@@ -4521,7 +4521,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and
"backgroundColor": "transparent",
"boundElements": [
{
- "id": "id658",
+ "id": "id1",
"type": "text",
},
],
@@ -4530,7 +4530,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and
"frameId": null,
"groupIds": [],
"height": 100,
- "id": "id657",
+ "id": "id0",
"index": "Zz",
"isDeleted": false,
"link": null,
@@ -4556,7 +4556,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and
"autoResize": true,
"backgroundColor": "transparent",
"boundElements": null,
- "containerId": "id657",
+ "containerId": "id0",
"customData": undefined,
"fillStyle": "solid",
"fontFamily": 5,
@@ -4564,7 +4564,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and
"frameId": null,
"groupIds": [],
"height": 25,
- "id": "id658",
+ "id": "id1",
"index": "a0",
"isDeleted": false,
"lineHeight": "1.25000",
@@ -4606,7 +4606,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and
"added": {},
"removed": {},
"updated": {
- "id658": {
+ "id1": {
"deleted": {
"angle": 0,
"version": 5,
@@ -4622,7 +4622,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and
},
},
},
- "id": "id663",
+ "id": "id6",
},
]
`;
@@ -4750,7 +4750,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and
"backgroundColor": "transparent",
"boundElements": [
{
- "id": "id650",
+ "id": "id1",
"type": "text",
},
],
@@ -4759,7 +4759,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and
"frameId": null,
"groupIds": [],
"height": 100,
- "id": "id649",
+ "id": "id0",
"index": "a0",
"isDeleted": false,
"link": null,
@@ -4785,7 +4785,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and
"autoResize": true,
"backgroundColor": "transparent",
"boundElements": null,
- "containerId": "id649",
+ "containerId": "id0",
"customData": undefined,
"fillStyle": "solid",
"fontFamily": 5,
@@ -4793,7 +4793,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and
"frameId": null,
"groupIds": [],
"height": 25,
- "id": "id650",
+ "id": "id1",
"index": "a1",
"isDeleted": false,
"lineHeight": "1.25000",
@@ -4837,7 +4837,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and
"added": {},
"removed": {},
"updated": {
- "id649": {
+ "id0": {
"deleted": {
"angle": 90,
"version": 8,
@@ -4853,7 +4853,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and
},
},
},
- "id": "id656",
+ "id": "id7",
},
]
`;
@@ -4983,7 +4983,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and
"frameId": null,
"groupIds": [],
"height": 100,
- "id": "id633",
+ "id": "id0",
"index": "a0",
"isDeleted": false,
"link": null,
@@ -5009,7 +5009,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and
"autoResize": true,
"backgroundColor": "transparent",
"boundElements": null,
- "containerId": "id633",
+ "containerId": "id0",
"customData": undefined,
"fillStyle": "solid",
"fontFamily": 5,
@@ -5017,7 +5017,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and
"frameId": null,
"groupIds": [],
"height": 100,
- "id": "id634",
+ "id": "id1",
"index": "a1",
"isDeleted": true,
"lineHeight": "1.25000",
@@ -5060,7 +5060,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and
"elements": {
"added": {},
"removed": {
- "id633": {
+ "id0": {
"deleted": {
"boundElements": [],
"isDeleted": false,
@@ -5069,7 +5069,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and
"inserted": {
"boundElements": [
{
- "id": "id634",
+ "id": "id1",
"type": "text",
},
],
@@ -5080,7 +5080,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and
},
"updated": {},
},
- "id": "id640",
+ "id": "id7",
},
]
`;
@@ -5206,7 +5206,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and
"backgroundColor": "transparent",
"boundElements": [
{
- "id": "id642",
+ "id": "id1",
"type": "text",
},
],
@@ -5215,7 +5215,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and
"frameId": null,
"groupIds": [],
"height": 100,
- "id": "id641",
+ "id": "id0",
"index": "Zz",
"isDeleted": true,
"link": null,
@@ -5249,7 +5249,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and
"frameId": null,
"groupIds": [],
"height": 100,
- "id": "id642",
+ "id": "id1",
"index": "a0",
"isDeleted": false,
"lineHeight": "1.25000",
@@ -5292,14 +5292,14 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and
"elements": {
"added": {},
"removed": {
- "id642": {
+ "id1": {
"deleted": {
"containerId": null,
"isDeleted": false,
"version": 8,
},
"inserted": {
- "containerId": "id641",
+ "containerId": "id0",
"isDeleted": true,
"version": 7,
},
@@ -5307,7 +5307,7 @@ exports[`history > multiplayer undo/redo > conflicts in bound text elements and
},
"updated": {},
},
- "id": "id648",
+ "id": "id7",
},
]
`;
@@ -5437,7 +5437,7 @@ exports[`history > multiplayer undo/redo > conflicts in frames and their childre
"frameId": null,
"groupIds": [],
"height": 100,
- "id": "id746",
+ "id": "id1",
"index": "Zz",
"isDeleted": false,
"link": null,
@@ -5467,7 +5467,7 @@ exports[`history > multiplayer undo/redo > conflicts in frames and their childre
"frameId": null,
"groupIds": [],
"height": 500,
- "id": "id745",
+ "id": "id0",
"index": "a0",
"isDeleted": true,
"link": null,
@@ -5506,7 +5506,7 @@ exports[`history > multiplayer undo/redo > conflicts in frames and their childre
"elements": {
"added": {},
"removed": {
- "id746": {
+ "id1": {
"deleted": {
"angle": 0,
"backgroundColor": "transparent",
@@ -5540,7 +5540,7 @@ exports[`history > multiplayer undo/redo > conflicts in frames and their childre
},
"updated": {},
},
- "id": "id755",
+ "id": "id10",
},
{
"appState": AppStateDelta {
@@ -5553,7 +5553,7 @@ exports[`history > multiplayer undo/redo > conflicts in frames and their childre
"added": {},
"removed": {},
"updated": {
- "id746": {
+ "id1": {
"deleted": {
"version": 10,
},
@@ -5563,7 +5563,7 @@ exports[`history > multiplayer undo/redo > conflicts in frames and their childre
},
},
},
- "id": "id756",
+ "id": "id11",
},
]
`;
@@ -5649,7 +5649,7 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh
"penMode": false,
"pendingImageElementId": null,
"previousSelectedElementIds": {
- "id469": true,
+ "id1": true,
},
"resizingElement": null,
"scrollX": 0,
@@ -5694,7 +5694,7 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh
"A",
],
"height": 100,
- "id": "id468",
+ "id": "id0",
"index": "a0",
"isDeleted": false,
"link": null,
@@ -5726,7 +5726,7 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh
"A",
],
"height": 100,
- "id": "id469",
+ "id": "id1",
"index": "a1",
"isDeleted": true,
"link": null,
@@ -5759,8 +5759,8 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh
"delta": Delta {
"deleted": {
"selectedElementIds": {
- "id468": true,
- "id469": true,
+ "id0": true,
+ "id1": true,
},
"selectedGroupIds": {
"A": true,
@@ -5777,7 +5777,7 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh
"removed": {},
"updated": {},
},
- "id": "id481",
+ "id": "id13",
},
{
"appState": AppStateDelta {
@@ -5790,7 +5790,7 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh
"inserted": {
"editingGroupId": null,
"selectedElementIds": {
- "id468": true,
+ "id0": true,
},
"selectedGroupIds": {
"A": true,
@@ -5803,7 +5803,7 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh
"removed": {},
"updated": {},
},
- "id": "id482",
+ "id": "id14",
},
{
"appState": AppStateDelta {
@@ -5815,7 +5815,7 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh
"inserted": {
"editingGroupId": "A",
"selectedElementIds": {
- "id469": true,
+ "id1": true,
},
},
},
@@ -5825,7 +5825,7 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh
"removed": {},
"updated": {},
},
- "id": "id485",
+ "id": "id17",
},
]
`;
@@ -5911,7 +5911,7 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh
"penMode": false,
"pendingImageElementId": null,
"previousSelectedElementIds": {
- "id418": true,
+ "id8": true,
},
"resizingElement": null,
"scrollX": 0,
@@ -5954,7 +5954,7 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh
"frameId": null,
"groupIds": [],
"height": 10,
- "id": "id410",
+ "id": "id0",
"index": "a0",
"isDeleted": false,
"link": null,
@@ -5984,7 +5984,7 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh
"frameId": null,
"groupIds": [],
"height": 10,
- "id": "id413",
+ "id": "id3",
"index": "a1",
"isDeleted": true,
"link": null,
@@ -6014,7 +6014,7 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh
"frameId": null,
"groupIds": [],
"height": 10,
- "id": "id418",
+ "id": "id8",
"index": "a2",
"isDeleted": true,
"link": null,
@@ -6047,7 +6047,7 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh
"delta": Delta {
"deleted": {
"selectedElementIds": {
- "id410": true,
+ "id0": true,
},
},
"inserted": {
@@ -6058,7 +6058,7 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh
"elements": {
"added": {},
"removed": {
- "id410": {
+ "id0": {
"deleted": {
"angle": 0,
"backgroundColor": "transparent",
@@ -6092,19 +6092,19 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh
},
"updated": {},
},
- "id": "id412",
+ "id": "id2",
},
{
"appState": AppStateDelta {
"delta": Delta {
"deleted": {
"selectedElementIds": {
- "id413": true,
+ "id3": true,
},
},
"inserted": {
"selectedElementIds": {
- "id410": true,
+ "id0": true,
},
},
},
@@ -6114,7 +6114,7 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh
"removed": {},
"updated": {},
},
- "id": "id428",
+ "id": "id18",
},
{
"appState": AppStateDelta {
@@ -6127,7 +6127,7 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh
"added": {},
"removed": {},
"updated": {
- "id413": {
+ "id3": {
"deleted": {
"backgroundColor": "#ffc9c9",
"version": 7,
@@ -6139,19 +6139,19 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh
},
},
},
- "id": "id429",
+ "id": "id19",
},
{
"appState": AppStateDelta {
"delta": Delta {
"deleted": {
"selectedElementIds": {
- "id418": true,
+ "id8": true,
},
},
"inserted": {
"selectedElementIds": {
- "id413": true,
+ "id3": true,
},
},
},
@@ -6161,7 +6161,7 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh
"removed": {},
"updated": {},
},
- "id": "id430",
+ "id": "id20",
},
{
"appState": AppStateDelta {
@@ -6174,7 +6174,7 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh
"added": {},
"removed": {},
"updated": {
- "id418": {
+ "id8": {
"deleted": {
"version": 7,
"x": 50,
@@ -6188,7 +6188,7 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh
},
},
},
- "id": "id431",
+ "id": "id21",
},
]
`;
@@ -6274,15 +6274,15 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh
"penMode": false,
"pendingImageElementId": null,
"previousSelectedElementIds": {
- "id433": true,
+ "id1": true,
},
"resizingElement": null,
"scrollX": 0,
"scrollY": 0,
"searchMatches": null,
"selectedElementIds": {
- "id433": true,
- "id434": true,
+ "id1": true,
+ "id2": true,
},
"selectedElementsAreBeingDragged": false,
"selectedGroupIds": {},
@@ -6320,7 +6320,7 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh
"frameId": null,
"groupIds": [],
"height": 100,
- "id": "id432",
+ "id": "id0",
"index": "a0",
"isDeleted": false,
"link": null,
@@ -6350,7 +6350,7 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh
"frameId": null,
"groupIds": [],
"height": 100,
- "id": "id433",
+ "id": "id1",
"index": "a1",
"isDeleted": false,
"link": null,
@@ -6380,7 +6380,7 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh
"frameId": null,
"groupIds": [],
"height": 100,
- "id": "id434",
+ "id": "id2",
"index": "a2",
"isDeleted": false,
"link": null,
@@ -6413,7 +6413,7 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh
"delta": Delta {
"deleted": {
"selectedElementIds": {
- "id432": true,
+ "id0": true,
},
},
"inserted": {
@@ -6424,7 +6424,7 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh
"elements": {
"added": {},
"removed": {
- "id432": {
+ "id0": {
"deleted": {
"angle": 0,
"backgroundColor": "transparent",
@@ -6455,7 +6455,7 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh
"version": 1,
},
},
- "id433": {
+ "id1": {
"deleted": {
"angle": 0,
"backgroundColor": "transparent",
@@ -6486,7 +6486,7 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh
"version": 1,
},
},
- "id434": {
+ "id2": {
"deleted": {
"angle": 0,
"backgroundColor": "transparent",
@@ -6520,19 +6520,19 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh
},
"updated": {},
},
- "id": "id437",
+ "id": "id5",
},
{
"appState": AppStateDelta {
"delta": Delta {
"deleted": {
"selectedElementIds": {
- "id433": true,
+ "id1": true,
},
},
"inserted": {
"selectedElementIds": {
- "id432": true,
+ "id0": true,
},
},
},
@@ -6542,14 +6542,14 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh
"removed": {},
"updated": {},
},
- "id": "id450",
+ "id": "id18",
},
{
"appState": AppStateDelta {
"delta": Delta {
"deleted": {
"selectedElementIds": {
- "id434": true,
+ "id2": true,
},
},
"inserted": {
@@ -6562,7 +6562,7 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh
"removed": {},
"updated": {},
},
- "id": "id451",
+ "id": "id19",
},
]
`;
@@ -6656,10 +6656,10 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh
"scrollY": 0,
"searchMatches": null,
"selectedElementIds": {
- "id452": true,
- "id453": true,
- "id454": true,
- "id455": true,
+ "id0": true,
+ "id1": true,
+ "id2": true,
+ "id3": true,
},
"selectedElementsAreBeingDragged": false,
"selectedGroupIds": {
@@ -6702,7 +6702,7 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh
"A",
],
"height": 100,
- "id": "id452",
+ "id": "id0",
"index": "a0",
"isDeleted": false,
"link": null,
@@ -6734,7 +6734,7 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh
"A",
],
"height": 100,
- "id": "id453",
+ "id": "id1",
"index": "a1",
"isDeleted": false,
"link": null,
@@ -6766,7 +6766,7 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh
"B",
],
"height": 100,
- "id": "id454",
+ "id": "id2",
"index": "a2",
"isDeleted": false,
"link": null,
@@ -6798,7 +6798,7 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh
"B",
],
"height": 100,
- "id": "id455",
+ "id": "id3",
"index": "a3",
"isDeleted": false,
"link": null,
@@ -6831,8 +6831,8 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh
"delta": Delta {
"deleted": {
"selectedElementIds": {
- "id452": true,
- "id453": true,
+ "id0": true,
+ "id1": true,
},
"selectedGroupIds": {
"A": true,
@@ -6849,15 +6849,15 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh
"removed": {},
"updated": {},
},
- "id": "id466",
+ "id": "id14",
},
{
"appState": AppStateDelta {
"delta": Delta {
"deleted": {
"selectedElementIds": {
- "id454": true,
- "id455": true,
+ "id2": true,
+ "id3": true,
},
"selectedGroupIds": {
"B": true,
@@ -6874,7 +6874,7 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh
"removed": {},
"updated": {},
},
- "id": "id467",
+ "id": "id15",
},
]
`;
@@ -6965,7 +6965,7 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh
"scrollY": 0,
"searchMatches": null,
"selectedElementIds": {
- "id486": true,
+ "id0": true,
},
"selectedElementsAreBeingDragged": false,
"selectedGroupIds": {},
@@ -7006,7 +7006,7 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh
"frameId": null,
"groupIds": [],
"height": 10,
- "id": "id486",
+ "id": "id0",
"index": "a0",
"isDeleted": true,
"lastCommittedPoint": [
@@ -7057,7 +7057,7 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh
"delta": Delta {
"deleted": {
"selectedElementIds": {
- "id486": true,
+ "id0": true,
},
},
"inserted": {
@@ -7068,7 +7068,7 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh
"elements": {
"added": {},
"removed": {
- "id486": {
+ "id0": {
"deleted": {
"angle": 0,
"backgroundColor": "transparent",
@@ -7123,13 +7123,13 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh
},
"updated": {},
},
- "id": "id488",
+ "id": "id2",
},
{
"appState": AppStateDelta {
"delta": Delta {
"deleted": {
- "selectedLinearElementId": "id486",
+ "selectedLinearElementId": "id0",
},
"inserted": {
"selectedLinearElementId": null,
@@ -7141,13 +7141,13 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh
"removed": {},
"updated": {},
},
- "id": "id498",
+ "id": "id12",
},
{
"appState": AppStateDelta {
"delta": Delta {
"deleted": {
- "editingLinearElementId": "id486",
+ "editingLinearElementId": "id0",
},
"inserted": {
"editingLinearElementId": null,
@@ -7159,7 +7159,7 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh
"removed": {},
"updated": {},
},
- "id": "id499",
+ "id": "id13",
},
{
"appState": AppStateDelta {
@@ -7168,7 +7168,7 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh
"editingLinearElementId": null,
},
"inserted": {
- "editingLinearElementId": "id486",
+ "editingLinearElementId": "id0",
},
},
},
@@ -7177,7 +7177,7 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh
"removed": {},
"updated": {},
},
- "id": "id500",
+ "id": "id14",
},
]
`;
@@ -7304,7 +7304,7 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh
"frameId": null,
"groupIds": [],
"height": 10,
- "id": "id401",
+ "id": "id0",
"index": "a0",
"isDeleted": true,
"link": null,
@@ -7337,7 +7337,7 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh
"delta": Delta {
"deleted": {
"selectedElementIds": {
- "id401": true,
+ "id0": true,
},
},
"inserted": {
@@ -7350,7 +7350,7 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh
"removed": {},
"updated": {},
},
- "id": "id408",
+ "id": "id7",
},
{
"appState": AppStateDelta {
@@ -7363,7 +7363,7 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh
"added": {},
"removed": {},
"updated": {
- "id401": {
+ "id0": {
"deleted": {
"backgroundColor": "#ffec99",
"version": 7,
@@ -7375,7 +7375,7 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh
},
},
},
- "id": "id409",
+ "id": "id8",
},
]
`;
@@ -7502,7 +7502,7 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh
"frameId": null,
"groupIds": [],
"height": 100,
- "id": "id514",
+ "id": "id1",
"index": "a1",
"isDeleted": true,
"link": null,
@@ -7532,7 +7532,7 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh
"frameId": null,
"groupIds": [],
"height": 100,
- "id": "id515",
+ "id": "id2",
"index": "a3V",
"isDeleted": true,
"link": null,
@@ -7562,7 +7562,7 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh
"frameId": null,
"groupIds": [],
"height": 100,
- "id": "id513",
+ "id": "id0",
"index": "a4",
"isDeleted": true,
"link": null,
@@ -7599,7 +7599,7 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh
"added": {},
"removed": {},
"updated": {
- "id514": {
+ "id1": {
"deleted": {
"index": "a1",
"version": 7,
@@ -7611,7 +7611,7 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh
},
},
},
- "id": "id523",
+ "id": "id10",
},
{
"appState": AppStateDelta {
@@ -7621,14 +7621,14 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh
},
"inserted": {
"selectedElementIds": {
- "id514": true,
+ "id1": true,
},
},
},
},
"elements": {
"added": {
- "id513": {
+ "id0": {
"deleted": {
"isDeleted": true,
"version": 4,
@@ -7659,7 +7659,7 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh
"y": 10,
},
},
- "id514": {
+ "id1": {
"deleted": {
"isDeleted": true,
"version": 8,
@@ -7690,7 +7690,7 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh
"y": 20,
},
},
- "id515": {
+ "id2": {
"deleted": {
"isDeleted": true,
"version": 4,
@@ -7725,7 +7725,7 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh
"removed": {},
"updated": {},
},
- "id": "id524",
+ "id": "id11",
},
]
`;
@@ -7854,7 +7854,7 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh
"frameId": null,
"groupIds": [],
"height": 100,
- "id": "id501",
+ "id": "id0",
"index": "Zx",
"isDeleted": true,
"link": null,
@@ -7884,7 +7884,7 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh
"frameId": null,
"groupIds": [],
"height": 100,
- "id": "id503",
+ "id": "id2",
"index": "Zy",
"isDeleted": true,
"link": null,
@@ -7914,7 +7914,7 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh
"frameId": null,
"groupIds": [],
"height": 100,
- "id": "id502",
+ "id": "id1",
"index": "a1",
"isDeleted": true,
"link": null,
@@ -7951,7 +7951,7 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh
"added": {},
"removed": {},
"updated": {
- "id502": {
+ "id1": {
"deleted": {
"index": "a1",
"version": 6,
@@ -7963,7 +7963,7 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh
},
},
},
- "id": "id511",
+ "id": "id10",
},
{
"appState": AppStateDelta {
@@ -7973,14 +7973,14 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh
},
"inserted": {
"selectedElementIds": {
- "id502": true,
+ "id1": true,
},
},
},
},
"elements": {
"added": {
- "id501": {
+ "id0": {
"deleted": {
"isDeleted": true,
"version": 4,
@@ -8011,7 +8011,7 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh
"y": 10,
},
},
- "id502": {
+ "id1": {
"deleted": {
"isDeleted": true,
"version": 7,
@@ -8042,7 +8042,7 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh
"y": 20,
},
},
- "id503": {
+ "id2": {
"deleted": {
"isDeleted": true,
"version": 4,
@@ -8077,7 +8077,7 @@ exports[`history > multiplayer undo/redo > should iterate through the history wh
"removed": {},
"updated": {},
},
- "id": "id512",
+ "id": "id11",
},
]
`;
@@ -8165,16 +8165,16 @@ exports[`history > multiplayer undo/redo > should not let remote changes to inte
"penMode": false,
"pendingImageElementId": null,
"previousSelectedElementIds": {
- "id542": true,
- "id545": true,
+ "id0": true,
+ "id3": true,
},
"resizingElement": null,
"scrollX": 0,
"scrollY": 0,
"searchMatches": null,
"selectedElementIds": {
- "id542": true,
- "id545": true,
+ "id0": true,
+ "id3": true,
},
"selectedElementsAreBeingDragged": false,
"selectedGroupIds": {},
@@ -8212,7 +8212,7 @@ exports[`history > multiplayer undo/redo > should not let remote changes to inte
"frameId": null,
"groupIds": [],
"height": 10,
- "id": "id542",
+ "id": "id0",
"index": "a0",
"isDeleted": false,
"link": null,
@@ -8242,7 +8242,7 @@ exports[`history > multiplayer undo/redo > should not let remote changes to inte
"frameId": null,
"groupIds": [],
"height": 10,
- "id": "id545",
+ "id": "id3",
"index": "a1",
"isDeleted": false,
"link": null,
@@ -8272,7 +8272,7 @@ exports[`history > multiplayer undo/redo > should not let remote changes to inte
"frameId": null,
"groupIds": [],
"height": 100,
- "id": "id555",
+ "id": "id13",
"index": "a2",
"isDeleted": false,
"link": null,
@@ -8305,7 +8305,7 @@ exports[`history > multiplayer undo/redo > should not let remote changes to inte
"delta": Delta {
"deleted": {
"selectedElementIds": {
- "id542": true,
+ "id0": true,
},
},
"inserted": {
@@ -8316,7 +8316,7 @@ exports[`history > multiplayer undo/redo > should not let remote changes to inte
"elements": {
"added": {},
"removed": {
- "id542": {
+ "id0": {
"deleted": {
"angle": 0,
"backgroundColor": "transparent",
@@ -8350,19 +8350,19 @@ exports[`history > multiplayer undo/redo > should not let remote changes to inte
},
"updated": {},
},
- "id": "id563",
+ "id": "id21",
},
{
"appState": AppStateDelta {
"delta": Delta {
"deleted": {
"selectedElementIds": {
- "id545": true,
+ "id3": true,
},
},
"inserted": {
"selectedElementIds": {
- "id542": true,
+ "id0": true,
},
},
},
@@ -8370,7 +8370,7 @@ exports[`history > multiplayer undo/redo > should not let remote changes to inte
"elements": {
"added": {},
"removed": {
- "id545": {
+ "id3": {
"deleted": {
"angle": 0,
"backgroundColor": "transparent",
@@ -8404,19 +8404,19 @@ exports[`history > multiplayer undo/redo > should not let remote changes to inte
},
"updated": {},
},
- "id": "id564",
+ "id": "id22",
},
{
"appState": AppStateDelta {
"delta": Delta {
"deleted": {
"selectedElementIds": {
- "id542": true,
+ "id0": true,
},
},
"inserted": {
"selectedElementIds": {
- "id545": true,
+ "id3": true,
},
},
},
@@ -8426,14 +8426,14 @@ exports[`history > multiplayer undo/redo > should not let remote changes to inte
"removed": {},
"updated": {},
},
- "id": "id565",
+ "id": "id23",
},
{
"appState": AppStateDelta {
"delta": Delta {
"deleted": {
"selectedElementIds": {
- "id545": true,
+ "id3": true,
},
},
"inserted": {
@@ -8446,7 +8446,7 @@ exports[`history > multiplayer undo/redo > should not let remote changes to inte
"removed": {},
"updated": {},
},
- "id": "id566",
+ "id": "id24",
},
{
"appState": AppStateDelta {
@@ -8459,7 +8459,7 @@ exports[`history > multiplayer undo/redo > should not let remote changes to inte
"added": {},
"removed": {},
"updated": {
- "id542": {
+ "id0": {
"deleted": {
"version": 9,
"x": 90,
@@ -8471,7 +8471,7 @@ exports[`history > multiplayer undo/redo > should not let remote changes to inte
"y": 10,
},
},
- "id545": {
+ "id3": {
"deleted": {
"version": 9,
"x": 110,
@@ -8485,7 +8485,7 @@ exports[`history > multiplayer undo/redo > should not let remote changes to inte
},
},
},
- "id": "id567",
+ "id": "id25",
},
]
`;
@@ -8612,7 +8612,7 @@ exports[`history > multiplayer undo/redo > should not let remote changes to inte
"frameId": null,
"groupIds": [],
"height": 50,
- "id": "id525",
+ "id": "id0",
"index": "a0",
"isDeleted": false,
"lastCommittedPoint": [
@@ -8671,7 +8671,7 @@ exports[`history > multiplayer undo/redo > should not let remote changes to inte
"frameId": null,
"groupIds": [],
"height": 100,
- "id": "id526",
+ "id": "id1",
"index": "a1",
"isDeleted": false,
"link": null,
@@ -8709,7 +8709,7 @@ exports[`history > multiplayer undo/redo > should not let remote changes to inte
"elements": {
"added": {},
"removed": {
- "id525": {
+ "id0": {
"deleted": {
"angle": 0,
"backgroundColor": "transparent",
@@ -8772,7 +8772,7 @@ exports[`history > multiplayer undo/redo > should not let remote changes to inte
},
"updated": {},
},
- "id": "id530",
+ "id": "id5",
},
]
`;
@@ -8863,7 +8863,7 @@ exports[`history > multiplayer undo/redo > should not let remote changes to inte
"scrollY": 0,
"searchMatches": null,
"selectedElementIds": {
- "id531": true,
+ "id0": true,
},
"selectedElementsAreBeingDragged": false,
"selectedGroupIds": {},
@@ -8901,7 +8901,7 @@ exports[`history > multiplayer undo/redo > should not let remote changes to inte
"frameId": null,
"groupIds": [],
"height": 90,
- "id": "id531",
+ "id": "id0",
"index": "a0",
"isDeleted": false,
"link": null,
@@ -8931,7 +8931,7 @@ exports[`history > multiplayer undo/redo > should not let remote changes to inte
"frameId": null,
"groupIds": [],
"height": 100,
- "id": "id535",
+ "id": "id4",
"index": "a1",
"isDeleted": false,
"link": null,
@@ -8964,7 +8964,7 @@ exports[`history > multiplayer undo/redo > should not let remote changes to inte
"delta": Delta {
"deleted": {
"selectedElementIds": {
- "id531": true,
+ "id0": true,
},
},
"inserted": {
@@ -8975,7 +8975,7 @@ exports[`history > multiplayer undo/redo > should not let remote changes to inte
"elements": {
"added": {},
"removed": {
- "id531": {
+ "id0": {
"deleted": {
"angle": 0,
"backgroundColor": "transparent",
@@ -9009,7 +9009,7 @@ exports[`history > multiplayer undo/redo > should not let remote changes to inte
},
"updated": {},
},
- "id": "id540",
+ "id": "id9",
},
{
"appState": AppStateDelta {
@@ -9022,7 +9022,7 @@ exports[`history > multiplayer undo/redo > should not let remote changes to inte
"added": {},
"removed": {},
"updated": {
- "id531": {
+ "id0": {
"deleted": {
"height": 90,
"version": 9,
@@ -9036,7 +9036,7 @@ exports[`history > multiplayer undo/redo > should not let remote changes to inte
},
},
},
- "id": "id541",
+ "id": "id10",
},
]
`;
@@ -9127,7 +9127,7 @@ exports[`history > multiplayer undo/redo > should not override remote changes on
"scrollY": 0,
"searchMatches": null,
"selectedElementIds": {
- "id333": true,
+ "id0": true,
},
"selectedElementsAreBeingDragged": false,
"selectedGroupIds": {},
@@ -9165,7 +9165,7 @@ exports[`history > multiplayer undo/redo > should not override remote changes on
"frameId": null,
"groupIds": [],
"height": 10,
- "id": "id333",
+ "id": "id0",
"index": "a0",
"isDeleted": false,
"link": null,
@@ -9195,7 +9195,7 @@ exports[`history > multiplayer undo/redo > should not override remote changes on
"frameId": null,
"groupIds": [],
"height": 100,
- "id": "id338",
+ "id": "id5",
"index": "a1",
"isDeleted": false,
"link": null,
@@ -9232,7 +9232,7 @@ exports[`history > multiplayer undo/redo > should not override remote changes on
"added": {},
"removed": {},
"updated": {
- "id333": {
+ "id0": {
"deleted": {
"backgroundColor": "transparent",
"version": 7,
@@ -9244,7 +9244,7 @@ exports[`history > multiplayer undo/redo > should not override remote changes on
},
},
},
- "id": "id341",
+ "id": "id8",
},
]
`;
@@ -9256,7 +9256,7 @@ exports[`history > multiplayer undo/redo > should not override remote changes on
"delta": Delta {
"deleted": {
"selectedElementIds": {
- "id333": true,
+ "id0": true,
},
},
"inserted": {
@@ -9267,7 +9267,7 @@ exports[`history > multiplayer undo/redo > should not override remote changes on
"elements": {
"added": {},
"removed": {
- "id333": {
+ "id0": {
"deleted": {
"angle": 0,
"backgroundColor": "transparent",
@@ -9301,7 +9301,7 @@ exports[`history > multiplayer undo/redo > should not override remote changes on
},
"updated": {},
},
- "id": "id335",
+ "id": "id2",
},
]
`;
@@ -9392,7 +9392,7 @@ exports[`history > multiplayer undo/redo > should not override remote changes on
"scrollY": 0,
"searchMatches": null,
"selectedElementIds": {
- "id342": true,
+ "id0": true,
},
"selectedElementsAreBeingDragged": false,
"selectedGroupIds": {},
@@ -9430,7 +9430,7 @@ exports[`history > multiplayer undo/redo > should not override remote changes on
"frameId": null,
"groupIds": [],
"height": 10,
- "id": "id342",
+ "id": "id0",
"index": "a0",
"isDeleted": false,
"link": null,
@@ -9463,7 +9463,7 @@ exports[`history > multiplayer undo/redo > should not override remote changes on
"delta": Delta {
"deleted": {
"selectedElementIds": {
- "id342": true,
+ "id0": true,
},
},
"inserted": {
@@ -9474,7 +9474,7 @@ exports[`history > multiplayer undo/redo > should not override remote changes on
"elements": {
"added": {},
"removed": {
- "id342": {
+ "id0": {
"deleted": {
"angle": 0,
"backgroundColor": "transparent",
@@ -9508,7 +9508,7 @@ exports[`history > multiplayer undo/redo > should not override remote changes on
},
"updated": {},
},
- "id": "id344",
+ "id": "id2",
},
{
"appState": AppStateDelta {
@@ -9521,7 +9521,7 @@ exports[`history > multiplayer undo/redo > should not override remote changes on
"added": {},
"removed": {},
"updated": {
- "id342": {
+ "id0": {
"deleted": {
"backgroundColor": "#ffc9c9",
"version": 7,
@@ -9533,7 +9533,7 @@ exports[`history > multiplayer undo/redo > should not override remote changes on
},
},
},
- "id": "id348",
+ "id": "id6",
},
]
`;
@@ -9666,7 +9666,7 @@ exports[`history > multiplayer undo/redo > should override remotely added groups
"B",
],
"height": 100,
- "id": "id371",
+ "id": "id0",
"index": "a0",
"isDeleted": false,
"link": null,
@@ -9699,7 +9699,7 @@ exports[`history > multiplayer undo/redo > should override remotely added groups
"B",
],
"height": 100,
- "id": "id372",
+ "id": "id1",
"index": "a1",
"isDeleted": false,
"link": null,
@@ -9731,7 +9731,7 @@ exports[`history > multiplayer undo/redo > should override remotely added groups
"B",
],
"height": 100,
- "id": "id375",
+ "id": "id4",
"index": "a2",
"isDeleted": false,
"link": null,
@@ -9763,7 +9763,7 @@ exports[`history > multiplayer undo/redo > should override remotely added groups
"B",
],
"height": 100,
- "id": "id376",
+ "id": "id5",
"index": "a3",
"isDeleted": false,
"link": null,
@@ -9802,7 +9802,7 @@ exports[`history > multiplayer undo/redo > should override remotely added groups
"added": {},
"removed": {},
"updated": {
- "id371": {
+ "id0": {
"deleted": {
"groupIds": [
"A",
@@ -9815,7 +9815,7 @@ exports[`history > multiplayer undo/redo > should override remotely added groups
"version": 5,
},
},
- "id372": {
+ "id1": {
"deleted": {
"groupIds": [
"A",
@@ -9830,7 +9830,7 @@ exports[`history > multiplayer undo/redo > should override remotely added groups
},
},
},
- "id": "id378",
+ "id": "id7",
},
]
`;
@@ -9921,7 +9921,7 @@ exports[`history > multiplayer undo/redo > should override remotely added points
"scrollY": 0,
"searchMatches": null,
"selectedElementIds": {
- "id379": true,
+ "id0": true,
},
"selectedElementsAreBeingDragged": false,
"selectedGroupIds": {},
@@ -9962,7 +9962,7 @@ exports[`history > multiplayer undo/redo > should override remotely added points
"frameId": null,
"groupIds": [],
"height": 30,
- "id": "id379",
+ "id": "id0",
"index": "a0",
"isDeleted": false,
"lastCommittedPoint": [
@@ -10025,7 +10025,7 @@ exports[`history > multiplayer undo/redo > should override remotely added points
"delta": Delta {
"deleted": {
"selectedElementIds": {
- "id379": true,
+ "id0": true,
},
},
"inserted": {
@@ -10036,7 +10036,7 @@ exports[`history > multiplayer undo/redo > should override remotely added points
"elements": {
"added": {},
"removed": {
- "id379": {
+ "id0": {
"deleted": {
"angle": 0,
"backgroundColor": "transparent",
@@ -10091,7 +10091,7 @@ exports[`history > multiplayer undo/redo > should override remotely added points
},
"updated": {},
},
- "id": "id389",
+ "id": "id10",
},
{
"appState": AppStateDelta {
@@ -10104,7 +10104,7 @@ exports[`history > multiplayer undo/redo > should override remotely added points
"added": {},
"removed": {},
"updated": {
- "id379": {
+ "id0": {
"deleted": {
"height": 30,
"lastCommittedPoint": [
@@ -10158,13 +10158,13 @@ exports[`history > multiplayer undo/redo > should override remotely added points
},
},
},
- "id": "id390",
+ "id": "id11",
},
{
"appState": AppStateDelta {
"delta": Delta {
"deleted": {
- "selectedLinearElementId": "id379",
+ "selectedLinearElementId": "id0",
},
"inserted": {
"selectedLinearElementId": null,
@@ -10176,7 +10176,7 @@ exports[`history > multiplayer undo/redo > should override remotely added points
"removed": {},
"updated": {},
},
- "id": "id391",
+ "id": "id12",
},
]
`;
@@ -10303,7 +10303,7 @@ exports[`history > multiplayer undo/redo > should redistribute deltas when eleme
"frameId": null,
"groupIds": [],
"height": 10,
- "id": "id392",
+ "id": "id0",
"index": "a0",
"isDeleted": false,
"link": null,
@@ -10336,7 +10336,7 @@ exports[`history > multiplayer undo/redo > should redistribute deltas when eleme
"delta": Delta {
"deleted": {
"selectedElementIds": {
- "id392": true,
+ "id0": true,
},
},
"inserted": {
@@ -10347,7 +10347,7 @@ exports[`history > multiplayer undo/redo > should redistribute deltas when eleme
"elements": {
"added": {},
"removed": {
- "id392": {
+ "id0": {
"deleted": {
"angle": 0,
"backgroundColor": "#ffec99",
@@ -10381,7 +10381,7 @@ exports[`history > multiplayer undo/redo > should redistribute deltas when eleme
},
"updated": {},
},
- "id": "id399",
+ "id": "id7",
},
{
"appState": AppStateDelta {
@@ -10391,7 +10391,7 @@ exports[`history > multiplayer undo/redo > should redistribute deltas when eleme
},
"inserted": {
"selectedElementIds": {
- "id392": true,
+ "id0": true,
},
},
},
@@ -10401,7 +10401,7 @@ exports[`history > multiplayer undo/redo > should redistribute deltas when eleme
"removed": {},
"updated": {},
},
- "id": "id400",
+ "id": "id8",
},
]
`;
@@ -10770,7 +10770,7 @@ exports[`history > multiplayer undo/redo > should redraw arrows on undo > [end o
},
},
},
- "id": "id369",
+ "id": "id7",
},
{
"appState": AppStateDelta {
@@ -10847,7 +10847,7 @@ exports[`history > multiplayer undo/redo > should redraw arrows on undo > [end o
"removed": {},
"updated": {},
},
- "id": "id370",
+ "id": "id8",
},
]
`;
@@ -10940,7 +10940,7 @@ exports[`history > multiplayer undo/redo > should update history entries after r
"scrollY": 0,
"searchMatches": null,
"selectedElementIds": {
- "id349": true,
+ "id0": true,
},
"selectedElementsAreBeingDragged": false,
"selectedGroupIds": {},
@@ -10978,7 +10978,7 @@ exports[`history > multiplayer undo/redo > should update history entries after r
"frameId": null,
"groupIds": [],
"height": 10,
- "id": "id349",
+ "id": "id0",
"index": "a0",
"isDeleted": false,
"link": null,
@@ -11015,7 +11015,7 @@ exports[`history > multiplayer undo/redo > should update history entries after r
"added": {},
"removed": {},
"updated": {
- "id349": {
+ "id0": {
"deleted": {
"backgroundColor": "#d0bfff",
"version": 12,
@@ -11027,7 +11027,7 @@ exports[`history > multiplayer undo/redo > should update history entries after r
},
},
},
- "id": "id360",
+ "id": "id11",
},
{
"appState": AppStateDelta {
@@ -11040,7 +11040,7 @@ exports[`history > multiplayer undo/redo > should update history entries after r
"added": {},
"removed": {},
"updated": {
- "id349": {
+ "id0": {
"deleted": {
"backgroundColor": "transparent",
"version": 13,
@@ -11052,7 +11052,7 @@ exports[`history > multiplayer undo/redo > should update history entries after r
},
},
},
- "id": "id361",
+ "id": "id12",
},
]
`;
@@ -11064,7 +11064,7 @@ exports[`history > multiplayer undo/redo > should update history entries after r
"delta": Delta {
"deleted": {
"selectedElementIds": {
- "id349": true,
+ "id0": true,
},
},
"inserted": {
@@ -11075,7 +11075,7 @@ exports[`history > multiplayer undo/redo > should update history entries after r
"elements": {
"added": {},
"removed": {
- "id349": {
+ "id0": {
"deleted": {
"angle": 0,
"backgroundColor": "transparent",
@@ -11109,7 +11109,7 @@ exports[`history > multiplayer undo/redo > should update history entries after r
},
"updated": {},
},
- "id": "id351",
+ "id": "id2",
},
]
`;
@@ -11266,7 +11266,7 @@ exports[`history > singleplayer undo/redo > remounting undo/redo buttons should
"frameId": null,
"groupIds": [],
"height": 10,
- "id": "id329",
+ "id": "id1",
"index": "a1",
"isDeleted": true,
"link": null,
@@ -11300,14 +11300,14 @@ exports[`history > singleplayer undo/redo > remounting undo/redo buttons should
},
"inserted": {
"selectedElementIds": {
- "id329": true,
+ "id1": true,
},
},
},
},
"elements": {
"added": {
- "id329": {
+ "id1": {
"deleted": {
"isDeleted": true,
"version": 4,
@@ -11342,7 +11342,7 @@ exports[`history > singleplayer undo/redo > remounting undo/redo buttons should
"removed": {},
"updated": {},
},
- "id": "id332",
+ "id": "id4",
},
]
`;
@@ -11435,7 +11435,7 @@ exports[`history > singleplayer undo/redo > should clear the redo stack on eleme
"scrollY": 0,
"searchMatches": null,
"selectedElementIds": {
- "id50": true,
+ "id4": true,
},
"selectedElementsAreBeingDragged": false,
"selectedGroupIds": {},
@@ -11473,7 +11473,7 @@ exports[`history > singleplayer undo/redo > should clear the redo stack on eleme
"frameId": null,
"groupIds": [],
"height": 10,
- "id": "id46",
+ "id": "id0",
"index": "a0",
"isDeleted": true,
"link": null,
@@ -11503,7 +11503,7 @@ exports[`history > singleplayer undo/redo > should clear the redo stack on eleme
"frameId": null,
"groupIds": [],
"height": 10,
- "id": "id50",
+ "id": "id4",
"index": "a1",
"isDeleted": false,
"link": null,
@@ -11536,7 +11536,7 @@ exports[`history > singleplayer undo/redo > should clear the redo stack on eleme
"delta": Delta {
"deleted": {
"selectedElementIds": {
- "id50": true,
+ "id4": true,
},
},
"inserted": {
@@ -11547,7 +11547,7 @@ exports[`history > singleplayer undo/redo > should clear the redo stack on eleme
"elements": {
"added": {},
"removed": {
- "id50": {
+ "id4": {
"deleted": {
"angle": 0,
"backgroundColor": "transparent",
@@ -11581,7 +11581,7 @@ exports[`history > singleplayer undo/redo > should clear the redo stack on eleme
},
"updated": {},
},
- "id": "id52",
+ "id": "id6",
},
]
`;
@@ -11708,7 +11708,7 @@ exports[`history > singleplayer undo/redo > should create entry when selecting f
"frameId": null,
"groupIds": [],
"height": 10,
- "id": "id148",
+ "id": "id0",
"index": "a0",
"isDeleted": false,
"link": null,
@@ -11738,7 +11738,7 @@ exports[`history > singleplayer undo/redo > should create entry when selecting f
"frameId": null,
"groupIds": [],
"height": 10,
- "id": "id153",
+ "id": "id5",
"index": "a1",
"isDeleted": true,
"lastCommittedPoint": [
@@ -11792,7 +11792,7 @@ exports[`history > singleplayer undo/redo > should create entry when selecting f
"frameId": null,
"groupIds": [],
"height": 10,
- "id": "id157",
+ "id": "id9",
"index": "a2",
"isDeleted": false,
"lastCommittedPoint": [
@@ -11849,7 +11849,7 @@ exports[`history > singleplayer undo/redo > should create entry when selecting f
"delta": Delta {
"deleted": {
"selectedElementIds": {
- "id148": true,
+ "id0": true,
},
},
"inserted": {
@@ -11860,7 +11860,7 @@ exports[`history > singleplayer undo/redo > should create entry when selecting f
"elements": {
"added": {},
"removed": {
- "id148": {
+ "id0": {
"deleted": {
"angle": 0,
"backgroundColor": "transparent",
@@ -11894,7 +11894,7 @@ exports[`history > singleplayer undo/redo > should create entry when selecting f
},
"updated": {},
},
- "id": "id150",
+ "id": "id2",
},
{
"appState": AppStateDelta {
@@ -11904,7 +11904,7 @@ exports[`history > singleplayer undo/redo > should create entry when selecting f
},
"inserted": {
"selectedElementIds": {
- "id148": true,
+ "id0": true,
},
},
},
@@ -11914,7 +11914,7 @@ exports[`history > singleplayer undo/redo > should create entry when selecting f
"removed": {},
"updated": {},
},
- "id": "id152",
+ "id": "id4",
},
{
"appState": AppStateDelta {
@@ -11926,7 +11926,7 @@ exports[`history > singleplayer undo/redo > should create entry when selecting f
"elements": {
"added": {},
"removed": {
- "id157": {
+ "id9": {
"deleted": {
"angle": 0,
"backgroundColor": "transparent",
@@ -11984,12 +11984,12 @@ exports[`history > singleplayer undo/redo > should create entry when selecting f
},
"updated": {},
},
- "id": "id159",
+ "id": "id11",
},
]
`;
-exports[`history > singleplayer undo/redo > should create new history entry on scene import via drag&drop > [end of test] appState 1`] = `
+exports[`history > singleplayer undo/redo > should create new history entry on embeddable link drag&drop > [end of test] appState 1`] = `
{
"activeEmbeddable": null,
"activeLockedId": null,
@@ -12026,7 +12026,7 @@ exports[`history > singleplayer undo/redo > should create new history entry on s
"editingLinearElement": null,
"editingTextElement": null,
"elementsToHighlight": null,
- "errorMessage": null,
+ "errorMessage": "Couldn't load invalid file",
"exportBackground": true,
"exportEmbedScene": false,
"exportScale": 1,
@@ -12074,16 +12074,18 @@ exports[`history > singleplayer undo/redo > should create new history entry on s
"pendingImageElementId": null,
"previousSelectedElementIds": {},
"resizingElement": null,
- "scrollX": -50,
- "scrollY": -50,
+ "scrollX": 0,
+ "scrollY": 0,
"searchMatches": null,
- "selectedElementIds": {},
+ "selectedElementIds": {
+ "id0": true,
+ },
"selectedElementsAreBeingDragged": false,
"selectedGroupIds": {},
"selectionElement": null,
"shouldCacheIgnoreZoom": false,
"showHyperlinkPopup": false,
- "showWelcomeScreen": false,
+ "showWelcomeScreen": true,
"snapLines": [],
"startBoundElement": null,
"stats": {
@@ -12094,7 +12096,7 @@ exports[`history > singleplayer undo/redo > should create new history entry on s
"theme": "light",
"toast": null,
"userToFollow": null,
- "viewBackgroundColor": "#000",
+ "viewBackgroundColor": "#ffffff",
"viewModeEnabled": false,
"width": 0,
"zenModeEnabled": false,
@@ -12104,137 +12106,100 @@ exports[`history > singleplayer undo/redo > should create new history entry on s
}
`;
-exports[`history > singleplayer undo/redo > should create new history entry on scene import via drag&drop > [end of test] element 0 1`] = `
+exports[`history > singleplayer undo/redo > should create new history entry on embeddable link drag&drop > [end of test] element 0 1`] = `
{
"angle": 0,
"backgroundColor": "transparent",
- "boundElements": [],
+ "boundElements": null,
"customData": undefined,
"fillStyle": "solid",
"frameId": null,
"groupIds": [],
- "height": 100,
- "id": "A",
+ "height": 315,
+ "id": "id0",
"index": "a0",
- "isDeleted": true,
- "link": null,
- "locked": false,
- "opacity": 100,
- "roughness": 1,
- "roundness": null,
- "strokeColor": "#1e1e1e",
- "strokeStyle": "solid",
- "strokeWidth": 2,
- "type": "rectangle",
- "updated": 1,
- "version": 5,
- "width": 100,
- "x": 0,
- "y": 0,
-}
-`;
-
-exports[`history > singleplayer undo/redo > should create new history entry on scene import via drag&drop > [end of test] element 1 1`] = `
-{
- "angle": 0,
- "backgroundColor": "transparent",
- "boundElements": [],
- "fillStyle": "solid",
- "frameId": null,
- "groupIds": [],
- "height": 100,
- "id": "B",
- "index": "a1",
"isDeleted": false,
- "link": null,
+ "link": "https://www.youtube.com/watch?v=gkGMXY0wekg",
"locked": false,
"opacity": 100,
"roughness": 1,
"roundness": null,
- "strokeColor": "#1e1e1e",
+ "strokeColor": "transparent",
"strokeStyle": "solid",
"strokeWidth": 2,
- "type": "rectangle",
+ "type": "embeddable",
"updated": 1,
- "version": 5,
- "width": 100,
+ "version": 4,
+ "width": 560,
"x": 0,
"y": 0,
}
`;
-exports[`history > singleplayer undo/redo > should create new history entry on scene import via drag&drop > [end of test] number of elements 1`] = `2`;
+exports[`history > singleplayer undo/redo > should create new history entry on embeddable link drag&drop > [end of test] number of elements 1`] = `1`;
-exports[`history > singleplayer undo/redo > should create new history entry on scene import via drag&drop > [end of test] number of renders 1`] = `6`;
+exports[`history > singleplayer undo/redo > should create new history entry on embeddable link drag&drop > [end of test] number of renders 1`] = `7`;
-exports[`history > singleplayer undo/redo > should create new history entry on scene import via drag&drop > [end of test] redo stack 1`] = `[]`;
+exports[`history > singleplayer undo/redo > should create new history entry on embeddable link drag&drop > [end of test] redo stack 1`] = `[]`;
-exports[`history > singleplayer undo/redo > should create new history entry on scene import via drag&drop > [end of test] undo stack 1`] = `
+exports[`history > singleplayer undo/redo > should create new history entry on embeddable link drag&drop > [end of test] undo stack 1`] = `
[
{
"appState": AppStateDelta {
"delta": Delta {
"deleted": {
- "viewBackgroundColor": "#000",
+ "selectedElementIds": {
+ "id0": true,
+ },
},
"inserted": {
- "viewBackgroundColor": "#FFF",
+ "selectedElementIds": {},
},
},
},
"elements": {
- "added": {
- "A": {
- "deleted": {
- "isDeleted": true,
- "version": 5,
- },
- "inserted": {
- "isDeleted": false,
- "version": 4,
- },
- },
- },
+ "added": {},
"removed": {
- "B": {
+ "id0": {
"deleted": {
"angle": 0,
"backgroundColor": "transparent",
- "boundElements": [],
+ "boundElements": null,
+ "customData": undefined,
"fillStyle": "solid",
"frameId": null,
"groupIds": [],
- "height": 100,
- "index": "a1",
+ "height": 315,
+ "index": "a0",
"isDeleted": false,
- "link": null,
+ "link": "https://www.youtube.com/watch?v=gkGMXY0wekg",
"locked": false,
"opacity": 100,
"roughness": 1,
"roundness": null,
- "strokeColor": "#1e1e1e",
+ "strokeColor": "transparent",
"strokeStyle": "solid",
"strokeWidth": 2,
- "type": "rectangle",
- "version": 5,
- "width": 100,
+ "type": "embeddable",
+ "version": 4,
+ "width": 560,
"x": 0,
"y": 0,
},
"inserted": {
"isDeleted": true,
- "version": 4,
+ "version": 3,
},
},
},
"updated": {},
},
- "id": "id80",
+ "id": "id4",
},
]
`;
-exports[`history > singleplayer undo/redo > should disable undo/redo buttons when stacks empty > [end of test] appState 1`] = `
+exports[`history > singleplayer undo/redo > should create new history entry on embeddable link paste > [end of test] appState 1`] = `
{
"activeEmbeddable": null,
"activeLockedId": null,
@@ -12306,7 +12271,10 @@ exports[`history > singleplayer undo/redo > should disable undo/redo buttons whe
"openMenu": null,
"openPopup": null,
"openSidebar": null,
- "originSnapOffset": null,
+ "originSnapOffset": {
+ "x": 0,
+ "y": 0,
+ },
"pasteDialog": {
"data": null,
"shown": false,
@@ -12320,14 +12288,14 @@ exports[`history > singleplayer undo/redo > should disable undo/redo buttons whe
"scrollY": 0,
"searchMatches": null,
"selectedElementIds": {
- "id323": true,
+ "id0": true,
},
"selectedElementsAreBeingDragged": false,
"selectedGroupIds": {},
"selectionElement": null,
"shouldCacheIgnoreZoom": false,
"showHyperlinkPopup": false,
- "showWelcomeScreen": false,
+ "showWelcomeScreen": true,
"snapLines": [],
"startBoundElement": null,
"stats": {
@@ -12348,49 +12316,949 @@ exports[`history > singleplayer undo/redo > should disable undo/redo buttons whe
}
`;
-exports[`history > singleplayer undo/redo > should disable undo/redo buttons when stacks empty > [end of test] element 0 1`] = `
+exports[`history > singleplayer undo/redo > should create new history entry on embeddable link paste > [end of test] element 0 1`] = `
{
"angle": 0,
"backgroundColor": "transparent",
- "boundElements": [],
+ "boundElements": null,
"customData": undefined,
"fillStyle": "solid",
"frameId": null,
"groupIds": [],
- "height": 100,
- "id": "A",
+ "height": 315,
+ "id": "id0",
"index": "a0",
"isDeleted": false,
- "link": null,
+ "link": "https://www.youtube.com/watch?v=gkGMXY0wekg",
"locked": false,
"opacity": 100,
"roughness": 1,
"roundness": null,
- "strokeColor": "#1e1e1e",
+ "strokeColor": "transparent",
"strokeStyle": "solid",
"strokeWidth": 2,
- "type": "rectangle",
+ "type": "embeddable",
"updated": 1,
- "version": 2,
- "width": 100,
+ "version": 4,
+ "width": 560,
"x": 0,
"y": 0,
}
`;
-exports[`history > singleplayer undo/redo > should disable undo/redo buttons when stacks empty > [end of test] element 1 1`] = `
-{
- "angle": 0,
- "backgroundColor": "transparent",
- "boundElements": null,
- "customData": undefined,
- "fillStyle": "solid",
- "frameId": null,
- "groupIds": [],
- "height": 10,
- "id": "id323",
- "index": "a1",
- "isDeleted": false,
+exports[`history > singleplayer undo/redo > should create new history entry on embeddable link paste > [end of test] number of elements 1`] = `1`;
+
+exports[`history > singleplayer undo/redo > should create new history entry on embeddable link paste > [end of test] number of renders 1`] = `7`;
+
+exports[`history > singleplayer undo/redo > should create new history entry on embeddable link paste > [end of test] redo stack 1`] = `[]`;
+
+exports[`history > singleplayer undo/redo > should create new history entry on embeddable link paste > [end of test] undo stack 1`] = `
+[
+ {
+ "appState": AppStateDelta {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elements": {
+ "added": {},
+ "removed": {
+ "id0": {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 315,
+ "index": "a0",
+ "isDeleted": false,
+ "link": "https://www.youtube.com/watch?v=gkGMXY0wekg",
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": null,
+ "strokeColor": "transparent",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "embeddable",
+ "version": 4,
+ "width": 560,
+ "x": 0,
+ "y": 0,
+ },
+ "inserted": {
+ "isDeleted": true,
+ "version": 3,
+ },
+ },
+ },
+ "updated": {},
+ },
+ "id": "id4",
+ },
+]
+`;
+
+exports[`history > singleplayer undo/redo > should create new history entry on image drag&drop > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeLockedId": null,
+ "activeTool": {
+ "customType": null,
+ "fromSelection": false,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "sharp",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 1000,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "lockedMultiSelections": {},
+ "multiElement": null,
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": {
+ "x": 0,
+ "y": 0,
+ },
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {},
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "searchMatches": null,
+ "selectedElementIds": {
+ "id0": true,
+ },
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 0,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`history > singleplayer undo/redo > should create new history entry on image drag&drop > [end of test] element 0 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "crop": null,
+ "customData": undefined,
+ "fileId": "fileId",
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 335,
+ "id": "id0",
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": null,
+ "scale": [
+ 1,
+ 1,
+ ],
+ "status": "pending",
+ "strokeColor": "transparent",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "image",
+ "updated": 1,
+ "version": 7,
+ "width": 318,
+ "x": -159,
+ "y": "-167.50000",
+}
+`;
+
+exports[`history > singleplayer undo/redo > should create new history entry on image drag&drop > [end of test] number of elements 1`] = `1`;
+
+exports[`history > singleplayer undo/redo > should create new history entry on image drag&drop > [end of test] number of renders 1`] = `7`;
+
+exports[`history > singleplayer undo/redo > should create new history entry on image drag&drop > [end of test] redo stack 1`] = `[]`;
+
+exports[`history > singleplayer undo/redo > should create new history entry on image drag&drop > [end of test] undo stack 1`] = `
+[
+ {
+ "appState": AppStateDelta {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elements": {
+ "added": {},
+ "removed": {
+ "id0": {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "crop": null,
+ "customData": undefined,
+ "fileId": "fileId",
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 335,
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": null,
+ "scale": [
+ 1,
+ 1,
+ ],
+ "status": "pending",
+ "strokeColor": "transparent",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "image",
+ "version": 7,
+ "width": 318,
+ "x": -159,
+ "y": "-167.50000",
+ },
+ "inserted": {
+ "isDeleted": true,
+ "version": 6,
+ },
+ },
+ },
+ "updated": {},
+ },
+ "id": "id4",
+ },
+]
+`;
+
+exports[`history > singleplayer undo/redo > should create new history entry on image paste > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeLockedId": null,
+ "activeTool": {
+ "customType": null,
+ "fromSelection": false,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "sharp",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 1000,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "lockedMultiSelections": {},
+ "multiElement": null,
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": {
+ "x": 0,
+ "y": 0,
+ },
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {},
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "searchMatches": null,
+ "selectedElementIds": {
+ "id0": true,
+ },
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": true,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 0,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`history > singleplayer undo/redo > should create new history entry on image paste > [end of test] element 0 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "crop": null,
+ "customData": undefined,
+ "fileId": "fileId",
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 77,
+ "id": "id0",
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": null,
+ "scale": [
+ 1,
+ 1,
+ ],
+ "status": "pending",
+ "strokeColor": "transparent",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "image",
+ "updated": 1,
+ "version": 7,
+ "width": 56,
+ "x": -28,
+ "y": "-38.50000",
+}
+`;
+
+exports[`history > singleplayer undo/redo > should create new history entry on image paste > [end of test] number of elements 1`] = `1`;
+
+exports[`history > singleplayer undo/redo > should create new history entry on image paste > [end of test] number of renders 1`] = `7`;
+
+exports[`history > singleplayer undo/redo > should create new history entry on image paste > [end of test] redo stack 1`] = `[]`;
+
+exports[`history > singleplayer undo/redo > should create new history entry on image paste > [end of test] undo stack 1`] = `
+[
+ {
+ "appState": AppStateDelta {
+ "delta": Delta {
+ "deleted": {
+ "selectedElementIds": {
+ "id0": true,
+ },
+ },
+ "inserted": {
+ "selectedElementIds": {},
+ },
+ },
+ },
+ "elements": {
+ "added": {},
+ "removed": {
+ "id0": {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "crop": null,
+ "customData": undefined,
+ "fileId": "fileId",
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 77,
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": null,
+ "scale": [
+ 1,
+ 1,
+ ],
+ "status": "pending",
+ "strokeColor": "transparent",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "image",
+ "version": 7,
+ "width": 56,
+ "x": -28,
+ "y": "-38.50000",
+ },
+ "inserted": {
+ "isDeleted": true,
+ "version": 6,
+ },
+ },
+ },
+ "updated": {},
+ },
+ "id": "id4",
+ },
+]
+`;
+
+exports[`history > singleplayer undo/redo > should create new history entry on scene import via drag&drop > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeLockedId": null,
+ "activeTool": {
+ "customType": null,
+ "fromSelection": false,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "sharp",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 0,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "lockedMultiSelections": {},
+ "multiElement": null,
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": {
+ "x": 0,
+ "y": 0,
+ },
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {},
+ "resizingElement": null,
+ "scrollX": -50,
+ "scrollY": -50,
+ "searchMatches": null,
+ "selectedElementIds": {},
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": false,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#000",
+ "viewModeEnabled": false,
+ "width": 0,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`history > singleplayer undo/redo > should create new history entry on scene import via drag&drop > [end of test] element 0 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": [],
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 100,
+ "id": "A",
+ "index": "a0",
+ "isDeleted": true,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": null,
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 5,
+ "width": 100,
+ "x": 0,
+ "y": 0,
+}
+`;
+
+exports[`history > singleplayer undo/redo > should create new history entry on scene import via drag&drop > [end of test] element 1 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": [],
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 100,
+ "id": "B",
+ "index": "a1",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": null,
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 5,
+ "width": 100,
+ "x": 0,
+ "y": 0,
+}
+`;
+
+exports[`history > singleplayer undo/redo > should create new history entry on scene import via drag&drop > [end of test] number of elements 1`] = `2`;
+
+exports[`history > singleplayer undo/redo > should create new history entry on scene import via drag&drop > [end of test] number of renders 1`] = `6`;
+
+exports[`history > singleplayer undo/redo > should create new history entry on scene import via drag&drop > [end of test] redo stack 1`] = `[]`;
+
+exports[`history > singleplayer undo/redo > should create new history entry on scene import via drag&drop > [end of test] undo stack 1`] = `
+[
+ {
+ "appState": AppStateDelta {
+ "delta": Delta {
+ "deleted": {
+ "viewBackgroundColor": "#000",
+ },
+ "inserted": {
+ "viewBackgroundColor": "#FFF",
+ },
+ },
+ },
+ "elements": {
+ "added": {
+ "A": {
+ "deleted": {
+ "isDeleted": true,
+ "version": 5,
+ },
+ "inserted": {
+ "isDeleted": false,
+ "version": 4,
+ },
+ },
+ },
+ "removed": {
+ "B": {
+ "deleted": {
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": [],
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 100,
+ "index": "a1",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": null,
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "version": 5,
+ "width": 100,
+ "x": 0,
+ "y": 0,
+ },
+ "inserted": {
+ "isDeleted": true,
+ "version": 4,
+ },
+ },
+ },
+ "updated": {},
+ },
+ "id": "id5",
+ },
+]
+`;
+
+exports[`history > singleplayer undo/redo > should disable undo/redo buttons when stacks empty > [end of test] appState 1`] = `
+{
+ "activeEmbeddable": null,
+ "activeLockedId": null,
+ "activeTool": {
+ "customType": null,
+ "fromSelection": false,
+ "lastActiveTool": null,
+ "locked": false,
+ "type": "selection",
+ },
+ "collaborators": Map {},
+ "contextMenu": null,
+ "croppingElementId": null,
+ "currentChartType": "bar",
+ "currentHoveredFontFamily": null,
+ "currentItemArrowType": "round",
+ "currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
+ "currentItemFillStyle": "solid",
+ "currentItemFontFamily": 5,
+ "currentItemFontSize": 20,
+ "currentItemOpacity": 100,
+ "currentItemRoughness": 1,
+ "currentItemRoundness": "sharp",
+ "currentItemStartArrowhead": null,
+ "currentItemStrokeColor": "#1e1e1e",
+ "currentItemStrokeStyle": "solid",
+ "currentItemStrokeWidth": 2,
+ "currentItemTextAlign": "left",
+ "cursorButton": "up",
+ "defaultSidebarDockedPreference": false,
+ "editingFrame": null,
+ "editingGroupId": null,
+ "editingLinearElement": null,
+ "editingTextElement": null,
+ "elementsToHighlight": null,
+ "errorMessage": null,
+ "exportBackground": true,
+ "exportEmbedScene": false,
+ "exportScale": 1,
+ "exportWithDarkMode": false,
+ "fileHandle": null,
+ "followedBy": Set {},
+ "frameRendering": {
+ "clip": true,
+ "enabled": true,
+ "name": true,
+ "outline": true,
+ },
+ "frameToHighlight": null,
+ "gridModeEnabled": false,
+ "gridSize": 20,
+ "gridStep": 5,
+ "height": 0,
+ "hoveredElementIds": {},
+ "isBindingEnabled": true,
+ "isCropping": false,
+ "isLoading": false,
+ "isResizing": false,
+ "isRotating": false,
+ "lastPointerDownWith": "mouse",
+ "lockedMultiSelections": {},
+ "multiElement": null,
+ "newElement": null,
+ "objectsSnapModeEnabled": false,
+ "offsetLeft": 0,
+ "offsetTop": 0,
+ "openDialog": null,
+ "openMenu": null,
+ "openPopup": null,
+ "openSidebar": null,
+ "originSnapOffset": null,
+ "pasteDialog": {
+ "data": null,
+ "shown": false,
+ },
+ "penDetected": false,
+ "penMode": false,
+ "pendingImageElementId": null,
+ "previousSelectedElementIds": {},
+ "resizingElement": null,
+ "scrollX": 0,
+ "scrollY": 0,
+ "searchMatches": null,
+ "selectedElementIds": {
+ "id1": true,
+ },
+ "selectedElementsAreBeingDragged": false,
+ "selectedGroupIds": {},
+ "selectionElement": null,
+ "shouldCacheIgnoreZoom": false,
+ "showHyperlinkPopup": false,
+ "showWelcomeScreen": false,
+ "snapLines": [],
+ "startBoundElement": null,
+ "stats": {
+ "open": false,
+ "panels": 3,
+ },
+ "suggestedBindings": [],
+ "theme": "light",
+ "toast": null,
+ "userToFollow": null,
+ "viewBackgroundColor": "#ffffff",
+ "viewModeEnabled": false,
+ "width": 0,
+ "zenModeEnabled": false,
+ "zoom": {
+ "value": 1,
+ },
+}
+`;
+
+exports[`history > singleplayer undo/redo > should disable undo/redo buttons when stacks empty > [end of test] element 0 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": [],
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 100,
+ "id": "A",
+ "index": "a0",
+ "isDeleted": false,
+ "link": null,
+ "locked": false,
+ "opacity": 100,
+ "roughness": 1,
+ "roundness": null,
+ "strokeColor": "#1e1e1e",
+ "strokeStyle": "solid",
+ "strokeWidth": 2,
+ "type": "rectangle",
+ "updated": 1,
+ "version": 2,
+ "width": 100,
+ "x": 0,
+ "y": 0,
+}
+`;
+
+exports[`history > singleplayer undo/redo > should disable undo/redo buttons when stacks empty > [end of test] element 1 1`] = `
+{
+ "angle": 0,
+ "backgroundColor": "transparent",
+ "boundElements": null,
+ "customData": undefined,
+ "fillStyle": "solid",
+ "frameId": null,
+ "groupIds": [],
+ "height": 10,
+ "id": "id1",
+ "index": "a1",
+ "isDeleted": false,
"link": null,
"locked": false,
"opacity": 100,
@@ -12421,7 +13289,7 @@ exports[`history > singleplayer undo/redo > should disable undo/redo buttons whe
"delta": Delta {
"deleted": {
"selectedElementIds": {
- "id323": true,
+ "id1": true,
},
},
"inserted": {
@@ -12432,7 +13300,7 @@ exports[`history > singleplayer undo/redo > should disable undo/redo buttons whe
"elements": {
"added": {},
"removed": {
- "id323": {
+ "id1": {
"deleted": {
"angle": 0,
"backgroundColor": "transparent",
@@ -12466,7 +13334,7 @@ exports[`history > singleplayer undo/redo > should disable undo/redo buttons whe
},
"updated": {},
},
- "id": "id327",
+ "id": "id5",
},
]
`;
@@ -12557,7 +13425,7 @@ exports[`history > singleplayer undo/redo > should end up with no history entry
"scrollY": 0,
"searchMatches": null,
"selectedElementIds": {
- "id70": true,
+ "id1": true,
},
"selectedElementsAreBeingDragged": false,
"selectedGroupIds": {},
@@ -12625,7 +13493,7 @@ exports[`history > singleplayer undo/redo > should end up with no history entry
"frameId": null,
"groupIds": [],
"height": 10,
- "id": "id70",
+ "id": "id1",
"index": "a1",
"isDeleted": false,
"link": null,
@@ -12658,7 +13526,7 @@ exports[`history > singleplayer undo/redo > should end up with no history entry
"delta": Delta {
"deleted": {
"selectedElementIds": {
- "id70": true,
+ "id1": true,
},
},
"inserted": {
@@ -12669,7 +13537,7 @@ exports[`history > singleplayer undo/redo > should end up with no history entry
"elements": {
"added": {},
"removed": {
- "id70": {
+ "id1": {
"deleted": {
"angle": 0,
"backgroundColor": "transparent",
@@ -12703,7 +13571,7 @@ exports[`history > singleplayer undo/redo > should end up with no history entry
},
"updated": {},
},
- "id": "id74",
+ "id": "id5",
},
]
`;
@@ -12789,7 +13657,7 @@ exports[`history > singleplayer undo/redo > should iterate through the history w
"penMode": false,
"pendingImageElementId": null,
"previousSelectedElementIds": {
- "id53": true,
+ "id0": true,
},
"resizingElement": null,
"scrollX": 0,
@@ -12832,7 +13700,7 @@ exports[`history > singleplayer undo/redo > should iterate through the history w
"frameId": null,
"groupIds": [],
"height": 10,
- "id": "id53",
+ "id": "id0",
"index": "a0",
"isDeleted": true,
"link": null,
@@ -12863,7 +13731,7 @@ exports[`history > singleplayer undo/redo > should iterate through the history w
"delta": Delta {
"deleted": {
"selectedElementIds": {
- "id53": true,
+ "id0": true,
},
},
"inserted": {
@@ -12876,14 +13744,14 @@ exports[`history > singleplayer undo/redo > should iterate through the history w
"removed": {},
"updated": {},
},
- "id": "id66",
+ "id": "id13",
},
{
"appState": AppStateDelta {
"delta": Delta {
"deleted": {
"selectedElementIds": {
- "id53": true,
+ "id0": true,
},
},
"inserted": {
@@ -12896,7 +13764,7 @@ exports[`history > singleplayer undo/redo > should iterate through the history w
"removed": {},
"updated": {},
},
- "id": "id67",
+ "id": "id14",
},
{
"appState": AppStateDelta {
@@ -12906,14 +13774,14 @@ exports[`history > singleplayer undo/redo > should iterate through the history w
},
"inserted": {
"selectedElementIds": {
- "id53": true,
+ "id0": true,
},
},
},
},
"elements": {
"added": {
- "id53": {
+ "id0": {
"deleted": {
"isDeleted": true,
"version": 4,
@@ -12948,7 +13816,7 @@ exports[`history > singleplayer undo/redo > should iterate through the history w
"removed": {},
"updated": {},
},
- "id": "id68",
+ "id": "id15",
},
]
`;
@@ -13041,7 +13909,7 @@ exports[`history > singleplayer undo/redo > should not clear the redo stack on s
"scrollY": 0,
"searchMatches": null,
"selectedElementIds": {
- "id18": true,
+ "id3": true,
},
"selectedElementsAreBeingDragged": false,
"selectedGroupIds": {},
@@ -13079,7 +13947,7 @@ exports[`history > singleplayer undo/redo > should not clear the redo stack on s
"frameId": null,
"groupIds": [],
"height": 10,
- "id": "id15",
+ "id": "id0",
"index": "a0",
"isDeleted": false,
"link": null,
@@ -13109,7 +13977,7 @@ exports[`history > singleplayer undo/redo > should not clear the redo stack on s
"frameId": null,
"groupIds": [],
"height": 10,
- "id": "id18",
+ "id": "id3",
"index": "a1",
"isDeleted": false,
"link": null,
@@ -13142,7 +14010,7 @@ exports[`history > singleplayer undo/redo > should not clear the redo stack on s
"delta": Delta {
"deleted": {
"selectedElementIds": {
- "id15": true,
+ "id0": true,
},
},
"inserted": {
@@ -13153,7 +14021,7 @@ exports[`history > singleplayer undo/redo > should not clear the redo stack on s
"elements": {
"added": {},
"removed": {
- "id15": {
+ "id0": {
"deleted": {
"angle": 0,
"backgroundColor": "transparent",
@@ -13187,7 +14055,7 @@ exports[`history > singleplayer undo/redo > should not clear the redo stack on s
},
"updated": {},
},
- "id": "id17",
+ "id": "id2",
},
{
"appState": AppStateDelta {
@@ -13197,7 +14065,7 @@ exports[`history > singleplayer undo/redo > should not clear the redo stack on s
},
"inserted": {
"selectedElementIds": {
- "id15": true,
+ "id0": true,
},
},
},
@@ -13207,14 +14075,14 @@ exports[`history > singleplayer undo/redo > should not clear the redo stack on s
"removed": {},
"updated": {},
},
- "id": "id24",
+ "id": "id9",
},
{
"appState": AppStateDelta {
"delta": Delta {
"deleted": {
"selectedElementIds": {
- "id15": true,
+ "id0": true,
},
},
"inserted": {
@@ -13227,19 +14095,19 @@ exports[`history > singleplayer undo/redo > should not clear the redo stack on s
"removed": {},
"updated": {},
},
- "id": "id27",
+ "id": "id12",
},
{
"appState": AppStateDelta {
"delta": Delta {
"deleted": {
"selectedElementIds": {
- "id18": true,
+ "id3": true,
},
},
"inserted": {
"selectedElementIds": {
- "id15": true,
+ "id0": true,
},
},
},
@@ -13247,7 +14115,7 @@ exports[`history > singleplayer undo/redo > should not clear the redo stack on s
"elements": {
"added": {},
"removed": {
- "id18": {
+ "id3": {
"deleted": {
"angle": 0,
"backgroundColor": "transparent",
@@ -13281,7 +14149,7 @@ exports[`history > singleplayer undo/redo > should not clear the redo stack on s
},
"updated": {},
},
- "id": "id28",
+ "id": "id13",
},
]
`;
@@ -13542,8 +14410,8 @@ exports[`history > singleplayer undo/redo > should not end up with history entry
"scrollY": 0,
"searchMatches": null,
"selectedElementIds": {
- "id4": true,
- "id5": true,
+ "id0": true,
+ "id1": true,
},
"selectedElementsAreBeingDragged": false,
"selectedGroupIds": {
@@ -13585,7 +14453,7 @@ exports[`history > singleplayer undo/redo > should not end up with history entry
"A",
],
"height": 100,
- "id": "id4",
+ "id": "id0",
"index": "a0",
"isDeleted": false,
"link": null,
@@ -13617,7 +14485,7 @@ exports[`history > singleplayer undo/redo > should not end up with history entry
"A",
],
"height": 100,
- "id": "id5",
+ "id": "id1",
"index": "a1",
"isDeleted": false,
"link": null,
@@ -13650,8 +14518,8 @@ exports[`history > singleplayer undo/redo > should not end up with history entry
"delta": Delta {
"deleted": {
"selectedElementIds": {
- "id4": true,
- "id5": true,
+ "id0": true,
+ "id1": true,
},
"selectedGroupIds": {
"A": true,
@@ -13666,7 +14534,7 @@ exports[`history > singleplayer undo/redo > should not end up with history entry
"elements": {
"added": {},
"removed": {
- "id4": {
+ "id0": {
"deleted": {
"angle": 0,
"backgroundColor": "transparent",
@@ -13699,7 +14567,7 @@ exports[`history > singleplayer undo/redo > should not end up with history entry
"version": 1,
},
},
- "id5": {
+ "id1": {
"deleted": {
"angle": 0,
"backgroundColor": "transparent",
@@ -13735,7 +14603,7 @@ exports[`history > singleplayer undo/redo > should not end up with history entry
},
"updated": {},
},
- "id": "id8",
+ "id": "id4",
},
]
`;
@@ -13865,7 +14733,7 @@ exports[`history > singleplayer undo/redo > should not end up with history entry
"frameId": null,
"groupIds": [],
"height": 100,
- "id": "id10",
+ "id": "id0",
"index": "a0",
"isDeleted": false,
"link": null,
@@ -13895,7 +14763,7 @@ exports[`history > singleplayer undo/redo > should not end up with history entry
"frameId": null,
"groupIds": [],
"height": 100,
- "id": "id11",
+ "id": "id1",
"index": "a1",
"isDeleted": false,
"link": null,
@@ -13933,7 +14801,7 @@ exports[`history > singleplayer undo/redo > should not end up with history entry
"elements": {
"added": {},
"removed": {
- "id10": {
+ "id0": {
"deleted": {
"angle": 0,
"backgroundColor": "transparent",
@@ -13964,7 +14832,7 @@ exports[`history > singleplayer undo/redo > should not end up with history entry
"version": 1,
},
},
- "id11": {
+ "id1": {
"deleted": {
"angle": 0,
"backgroundColor": "transparent",
@@ -13998,7 +14866,7 @@ exports[`history > singleplayer undo/redo > should not end up with history entry
},
"updated": {},
},
- "id": "id13",
+ "id": "id3",
},
]
`;
@@ -14084,14 +14952,14 @@ exports[`history > singleplayer undo/redo > should not override appstate changes
"penMode": false,
"pendingImageElementId": null,
"previousSelectedElementIds": {
- "id29": true,
+ "id0": true,
},
"resizingElement": null,
"scrollX": 0,
"scrollY": 0,
"searchMatches": null,
"selectedElementIds": {
- "id29": true,
+ "id0": true,
},
"selectedElementsAreBeingDragged": false,
"selectedGroupIds": {},
@@ -14129,7 +14997,7 @@ exports[`history > singleplayer undo/redo > should not override appstate changes
"frameId": null,
"groupIds": [],
"height": 10,
- "id": "id29",
+ "id": "id0",
"index": "a0",
"isDeleted": false,
"link": null,
@@ -14166,7 +15034,7 @@ exports[`history > singleplayer undo/redo > should not override appstate changes
"added": {},
"removed": {},
"updated": {
- "id29": {
+ "id0": {
"deleted": {
"backgroundColor": "#ffc9c9",
"version": 10,
@@ -14178,7 +15046,7 @@ exports[`history > singleplayer undo/redo > should not override appstate changes
},
},
},
- "id": "id43",
+ "id": "id14",
},
{
"appState": AppStateDelta {
@@ -14191,7 +15059,7 @@ exports[`history > singleplayer undo/redo > should not override appstate changes
"added": {},
"removed": {},
"updated": {
- "id29": {
+ "id0": {
"deleted": {
"backgroundColor": "transparent",
"version": 11,
@@ -14203,14 +15071,14 @@ exports[`history > singleplayer undo/redo > should not override appstate changes
},
},
},
- "id": "id44",
+ "id": "id15",
},
{
"appState": AppStateDelta {
"delta": Delta {
"deleted": {
"selectedElementIds": {
- "id29": true,
+ "id0": true,
},
},
"inserted": {
@@ -14223,7 +15091,7 @@ exports[`history > singleplayer undo/redo > should not override appstate changes
"removed": {},
"updated": {},
},
- "id": "id45",
+ "id": "id16",
},
]
`;
@@ -14235,7 +15103,7 @@ exports[`history > singleplayer undo/redo > should not override appstate changes
"delta": Delta {
"deleted": {
"selectedElementIds": {
- "id29": true,
+ "id0": true,
},
},
"inserted": {
@@ -14246,7 +15114,7 @@ exports[`history > singleplayer undo/redo > should not override appstate changes
"elements": {
"added": {},
"removed": {
- "id29": {
+ "id0": {
"deleted": {
"angle": 0,
"backgroundColor": "transparent",
@@ -14280,7 +15148,7 @@ exports[`history > singleplayer undo/redo > should not override appstate changes
},
"updated": {},
},
- "id": "id31",
+ "id": "id2",
},
]
`;
@@ -14424,7 +15292,7 @@ exports[`history > singleplayer undo/redo > should support appstate name or view
"removed": {},
"updated": {},
},
- "id": "id88",
+ "id": "id7",
},
{
"appState": AppStateDelta {
@@ -14442,7 +15310,7 @@ exports[`history > singleplayer undo/redo > should support appstate name or view
"removed": {},
"updated": {},
},
- "id": "id89",
+ "id": "id8",
},
]
`;
@@ -14528,14 +15396,14 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
"penMode": false,
"pendingImageElementId": null,
"previousSelectedElementIds": {
- "id230": true,
+ "id0": true,
},
"resizingElement": null,
"scrollX": 0,
"scrollY": 0,
"searchMatches": null,
"selectedElementIds": {
- "id243": true,
+ "id13": true,
},
"selectedElementsAreBeingDragged": false,
"selectedGroupIds": {},
@@ -14569,11 +15437,11 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
"backgroundColor": "transparent",
"boundElements": [
{
- "id": "id231",
+ "id": "id1",
"type": "text",
},
{
- "id": "id243",
+ "id": "id13",
"type": "arrow",
},
],
@@ -14582,7 +15450,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
"frameId": null,
"groupIds": [],
"height": 100,
- "id": "id230",
+ "id": "id0",
"index": "a0",
"isDeleted": false,
"link": null,
@@ -14608,7 +15476,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
"autoResize": true,
"backgroundColor": "transparent",
"boundElements": null,
- "containerId": "id230",
+ "containerId": "id0",
"customData": undefined,
"fillStyle": "solid",
"fontFamily": 5,
@@ -14616,7 +15484,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
"frameId": null,
"groupIds": [],
"height": 25,
- "id": "id231",
+ "id": "id1",
"index": "a1",
"isDeleted": false,
"lineHeight": "1.25000",
@@ -14647,7 +15515,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
"backgroundColor": "transparent",
"boundElements": [
{
- "id": "id243",
+ "id": "id13",
"type": "arrow",
},
],
@@ -14656,7 +15524,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
"frameId": null,
"groupIds": [],
"height": 100,
- "id": "id232",
+ "id": "id2",
"index": "a2",
"isDeleted": false,
"link": null,
@@ -14685,7 +15553,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
"elbowed": false,
"endArrowhead": "arrow",
"endBinding": {
- "elementId": "id232",
+ "elementId": "id2",
"focus": -0,
"gap": 1,
},
@@ -14693,7 +15561,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
"frameId": null,
"groupIds": [],
"height": 0,
- "id": "id243",
+ "id": "id13",
"index": "a3",
"isDeleted": false,
"lastCommittedPoint": null,
@@ -14716,7 +15584,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
},
"startArrowhead": null,
"startBinding": {
- "elementId": "id230",
+ "elementId": "id0",
"focus": 0,
"gap": 1,
},
@@ -14743,9 +15611,9 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
"delta": Delta {
"deleted": {
"selectedElementIds": {
- "id243": true,
+ "id13": true,
},
- "selectedLinearElementId": "id243",
+ "selectedLinearElementId": "id13",
},
"inserted": {
"selectedElementIds": {},
@@ -14756,7 +15624,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
"elements": {
"added": {},
"removed": {
- "id243": {
+ "id13": {
"deleted": {
"isDeleted": false,
"version": 10,
@@ -14768,11 +15636,11 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
},
},
"updated": {
- "id230": {
+ "id0": {
"deleted": {
"boundElements": [
{
- "id": "id243",
+ "id": "id13",
"type": "arrow",
},
],
@@ -14783,7 +15651,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
"version": 5,
},
},
- "id231": {
+ "id1": {
"deleted": {
"version": 6,
},
@@ -14791,11 +15659,11 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
"version": 4,
},
},
- "id232": {
+ "id2": {
"deleted": {
"boundElements": [
{
- "id": "id243",
+ "id": "id13",
"type": "arrow",
},
],
@@ -14808,7 +15676,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
},
},
},
- "id": "id248",
+ "id": "id18",
},
]
`;
@@ -14825,7 +15693,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
"elements": {
"added": {},
"removed": {
- "id230": {
+ "id0": {
"deleted": {
"angle": 0,
"backgroundColor": "transparent",
@@ -14856,7 +15724,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
"version": 1,
},
},
- "id231": {
+ "id1": {
"deleted": {
"angle": 0,
"autoResize": true,
@@ -14896,7 +15764,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
"version": 1,
},
},
- "id232": {
+ "id2": {
"deleted": {
"angle": 0,
"backgroundColor": "transparent",
@@ -14930,14 +15798,14 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
},
"updated": {},
},
- "id": "id234",
+ "id": "id4",
},
{
"appState": AppStateDelta {
"delta": Delta {
"deleted": {
"selectedElementIds": {
- "id230": true,
+ "id0": true,
},
},
"inserted": {
@@ -14950,14 +15818,14 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
"removed": {},
"updated": {},
},
- "id": "id237",
+ "id": "id7",
},
{
"appState": AppStateDelta {
"delta": Delta {
"deleted": {
"selectedElementIds": {
- "id231": true,
+ "id1": true,
},
},
"inserted": {
@@ -14970,7 +15838,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
"removed": {},
"updated": {},
},
- "id": "id240",
+ "id": "id10",
},
{
"appState": AppStateDelta {
@@ -14980,7 +15848,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
},
"inserted": {
"selectedElementIds": {
- "id231": true,
+ "id1": true,
},
},
},
@@ -14989,11 +15857,11 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
"added": {},
"removed": {},
"updated": {
- "id230": {
+ "id0": {
"deleted": {
"boundElements": [
{
- "id": "id231",
+ "id": "id1",
"type": "text",
},
],
@@ -15004,9 +15872,9 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
"version": 2,
},
},
- "id231": {
+ "id1": {
"deleted": {
- "containerId": "id230",
+ "containerId": "id0",
"height": 25,
"textAlign": "center",
"version": 4,
@@ -15028,20 +15896,20 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
},
},
},
- "id": "id242",
+ "id": "id12",
},
{
"appState": AppStateDelta {
"delta": Delta {
"deleted": {
"selectedElementIds": {
- "id243": true,
+ "id13": true,
},
- "selectedLinearElementId": "id243",
+ "selectedLinearElementId": "id13",
},
"inserted": {
"selectedElementIds": {
- "id230": true,
+ "id0": true,
},
"selectedLinearElementId": null,
},
@@ -15050,7 +15918,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
"elements": {
"added": {},
"removed": {
- "id243": {
+ "id13": {
"deleted": {
"angle": 0,
"backgroundColor": "transparent",
@@ -15059,7 +15927,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
"elbowed": false,
"endArrowhead": "arrow",
"endBinding": {
- "elementId": "id232",
+ "elementId": "id2",
"focus": -0,
"gap": 1,
},
@@ -15089,7 +15957,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
},
"startArrowhead": null,
"startBinding": {
- "elementId": "id230",
+ "elementId": "id0",
"focus": 0,
"gap": 1,
},
@@ -15109,11 +15977,11 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
},
},
"updated": {
- "id230": {
+ "id0": {
"deleted": {
"boundElements": [
{
- "id": "id243",
+ "id": "id13",
"type": "arrow",
},
],
@@ -15124,11 +15992,11 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
"version": 3,
},
},
- "id232": {
+ "id2": {
"deleted": {
"boundElements": [
{
- "id": "id243",
+ "id": "id13",
"type": "arrow",
},
],
@@ -15141,7 +16009,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
},
},
},
- "id": "id245",
+ "id": "id15",
},
]
`;
@@ -15227,14 +16095,14 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
"penMode": false,
"pendingImageElementId": null,
"previousSelectedElementIds": {
- "id212": true,
+ "id0": true,
},
"resizingElement": null,
"scrollX": 0,
"scrollY": 0,
"searchMatches": null,
"selectedElementIds": {
- "id225": true,
+ "id13": true,
},
"selectedElementsAreBeingDragged": false,
"selectedGroupIds": {},
@@ -15268,11 +16136,11 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
"backgroundColor": "transparent",
"boundElements": [
{
- "id": "id213",
+ "id": "id1",
"type": "text",
},
{
- "id": "id225",
+ "id": "id13",
"type": "arrow",
},
],
@@ -15281,7 +16149,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
"frameId": null,
"groupIds": [],
"height": 100,
- "id": "id212",
+ "id": "id0",
"index": "a0",
"isDeleted": false,
"link": null,
@@ -15307,7 +16175,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
"autoResize": true,
"backgroundColor": "transparent",
"boundElements": null,
- "containerId": "id212",
+ "containerId": "id0",
"customData": undefined,
"fillStyle": "solid",
"fontFamily": 5,
@@ -15315,7 +16183,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
"frameId": null,
"groupIds": [],
"height": 25,
- "id": "id213",
+ "id": "id1",
"index": "a1",
"isDeleted": false,
"lineHeight": "1.25000",
@@ -15346,7 +16214,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
"backgroundColor": "transparent",
"boundElements": [
{
- "id": "id225",
+ "id": "id13",
"type": "arrow",
},
],
@@ -15355,7 +16223,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
"frameId": null,
"groupIds": [],
"height": 100,
- "id": "id214",
+ "id": "id2",
"index": "a2",
"isDeleted": false,
"link": null,
@@ -15384,7 +16252,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
"elbowed": false,
"endArrowhead": "arrow",
"endBinding": {
- "elementId": "id214",
+ "elementId": "id2",
"focus": -0,
"gap": 1,
},
@@ -15392,7 +16260,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
"frameId": null,
"groupIds": [],
"height": 0,
- "id": "id225",
+ "id": "id13",
"index": "a3",
"isDeleted": false,
"lastCommittedPoint": null,
@@ -15415,7 +16283,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
},
"startArrowhead": null,
"startBinding": {
- "elementId": "id212",
+ "elementId": "id0",
"focus": 0,
"gap": 1,
},
@@ -15449,7 +16317,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
"elements": {
"added": {},
"removed": {
- "id212": {
+ "id0": {
"deleted": {
"angle": 0,
"backgroundColor": "transparent",
@@ -15480,7 +16348,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
"version": 1,
},
},
- "id213": {
+ "id1": {
"deleted": {
"angle": 0,
"autoResize": true,
@@ -15520,7 +16388,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
"version": 1,
},
},
- "id214": {
+ "id2": {
"deleted": {
"angle": 0,
"backgroundColor": "transparent",
@@ -15554,14 +16422,14 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
},
"updated": {},
},
- "id": "id216",
+ "id": "id4",
},
{
"appState": AppStateDelta {
"delta": Delta {
"deleted": {
"selectedElementIds": {
- "id212": true,
+ "id0": true,
},
},
"inserted": {
@@ -15574,14 +16442,14 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
"removed": {},
"updated": {},
},
- "id": "id219",
+ "id": "id7",
},
{
"appState": AppStateDelta {
"delta": Delta {
"deleted": {
"selectedElementIds": {
- "id213": true,
+ "id1": true,
},
},
"inserted": {
@@ -15594,7 +16462,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
"removed": {},
"updated": {},
},
- "id": "id222",
+ "id": "id10",
},
{
"appState": AppStateDelta {
@@ -15604,7 +16472,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
},
"inserted": {
"selectedElementIds": {
- "id213": true,
+ "id1": true,
},
},
},
@@ -15613,11 +16481,11 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
"added": {},
"removed": {},
"updated": {
- "id212": {
+ "id0": {
"deleted": {
"boundElements": [
{
- "id": "id213",
+ "id": "id1",
"type": "text",
},
],
@@ -15628,9 +16496,9 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
"version": 2,
},
},
- "id213": {
+ "id1": {
"deleted": {
- "containerId": "id212",
+ "containerId": "id0",
"height": 25,
"textAlign": "center",
"version": 4,
@@ -15652,20 +16520,20 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
},
},
},
- "id": "id224",
+ "id": "id12",
},
{
"appState": AppStateDelta {
"delta": Delta {
"deleted": {
"selectedElementIds": {
- "id225": true,
+ "id13": true,
},
- "selectedLinearElementId": "id225",
+ "selectedLinearElementId": "id13",
},
"inserted": {
"selectedElementIds": {
- "id212": true,
+ "id0": true,
},
"selectedLinearElementId": null,
},
@@ -15674,7 +16542,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
"elements": {
"added": {},
"removed": {
- "id225": {
+ "id13": {
"deleted": {
"angle": 0,
"backgroundColor": "transparent",
@@ -15683,7 +16551,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
"elbowed": false,
"endArrowhead": "arrow",
"endBinding": {
- "elementId": "id214",
+ "elementId": "id2",
"focus": -0,
"gap": 1,
},
@@ -15713,7 +16581,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
},
"startArrowhead": null,
"startBinding": {
- "elementId": "id212",
+ "elementId": "id0",
"focus": 0,
"gap": 1,
},
@@ -15733,11 +16601,11 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
},
},
"updated": {
- "id212": {
+ "id0": {
"deleted": {
"boundElements": [
{
- "id": "id225",
+ "id": "id13",
"type": "arrow",
},
],
@@ -15748,7 +16616,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
"version": 5,
},
},
- "id213": {
+ "id1": {
"deleted": {
"version": 8,
},
@@ -15756,11 +16624,11 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
"version": 6,
},
},
- "id214": {
+ "id2": {
"deleted": {
"boundElements": [
{
- "id": "id225",
+ "id": "id13",
"type": "arrow",
},
],
@@ -15773,7 +16641,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
},
},
},
- "id": "id229",
+ "id": "id17",
},
]
`;
@@ -15859,14 +16727,14 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
"penMode": false,
"pendingImageElementId": null,
"previousSelectedElementIds": {
- "id249": true,
+ "id0": true,
},
"resizingElement": null,
"scrollX": 0,
"scrollY": 0,
"searchMatches": null,
"selectedElementIds": {
- "id262": true,
+ "id13": true,
},
"selectedElementsAreBeingDragged": false,
"selectedGroupIds": {},
@@ -15900,11 +16768,11 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
"backgroundColor": "transparent",
"boundElements": [
{
- "id": "id250",
+ "id": "id1",
"type": "text",
},
{
- "id": "id262",
+ "id": "id13",
"type": "arrow",
},
],
@@ -15913,7 +16781,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
"frameId": null,
"groupIds": [],
"height": 100,
- "id": "id249",
+ "id": "id0",
"index": "a0",
"isDeleted": false,
"link": null,
@@ -15939,7 +16807,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
"autoResize": true,
"backgroundColor": "transparent",
"boundElements": null,
- "containerId": "id249",
+ "containerId": "id0",
"customData": undefined,
"fillStyle": "solid",
"fontFamily": 5,
@@ -15947,7 +16815,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
"frameId": null,
"groupIds": [],
"height": 25,
- "id": "id250",
+ "id": "id1",
"index": "a1",
"isDeleted": false,
"lineHeight": "1.25000",
@@ -15978,7 +16846,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
"backgroundColor": "transparent",
"boundElements": [
{
- "id": "id262",
+ "id": "id13",
"type": "arrow",
},
],
@@ -15987,7 +16855,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
"frameId": null,
"groupIds": [],
"height": 100,
- "id": "id251",
+ "id": "id2",
"index": "a2",
"isDeleted": false,
"link": null,
@@ -16016,7 +16884,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
"elbowed": false,
"endArrowhead": "arrow",
"endBinding": {
- "elementId": "id251",
+ "elementId": "id2",
"focus": -0,
"gap": 1,
},
@@ -16024,7 +16892,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
"frameId": null,
"groupIds": [],
"height": 0,
- "id": "id262",
+ "id": "id13",
"index": "a3",
"isDeleted": false,
"lastCommittedPoint": null,
@@ -16047,7 +16915,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
},
"startArrowhead": null,
"startBinding": {
- "elementId": "id249",
+ "elementId": "id0",
"focus": 0,
"gap": 1,
},
@@ -16081,7 +16949,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
"elements": {
"added": {},
"removed": {
- "id249": {
+ "id0": {
"deleted": {
"angle": 0,
"backgroundColor": "transparent",
@@ -16112,7 +16980,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
"version": 7,
},
},
- "id250": {
+ "id1": {
"deleted": {
"angle": 0,
"autoResize": true,
@@ -16152,7 +17020,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
"version": 8,
},
},
- "id251": {
+ "id2": {
"deleted": {
"angle": 0,
"backgroundColor": "transparent",
@@ -16186,14 +17054,14 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
},
"updated": {},
},
- "id": "id270",
+ "id": "id21",
},
{
"appState": AppStateDelta {
"delta": Delta {
"deleted": {
"selectedElementIds": {
- "id249": true,
+ "id0": true,
},
},
"inserted": {
@@ -16206,14 +17074,14 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
"removed": {},
"updated": {},
},
- "id": "id271",
+ "id": "id22",
},
{
"appState": AppStateDelta {
"delta": Delta {
"deleted": {
"selectedElementIds": {
- "id250": true,
+ "id1": true,
},
},
"inserted": {
@@ -16226,7 +17094,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
"removed": {},
"updated": {},
},
- "id": "id272",
+ "id": "id23",
},
{
"appState": AppStateDelta {
@@ -16236,7 +17104,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
},
"inserted": {
"selectedElementIds": {
- "id250": true,
+ "id1": true,
},
},
},
@@ -16245,11 +17113,11 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
"added": {},
"removed": {},
"updated": {
- "id249": {
+ "id0": {
"deleted": {
"boundElements": [
{
- "id": "id250",
+ "id": "id1",
"type": "text",
},
],
@@ -16260,9 +17128,9 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
"version": 8,
},
},
- "id250": {
+ "id1": {
"deleted": {
- "containerId": "id249",
+ "containerId": "id0",
"height": 25,
"textAlign": "center",
"version": 10,
@@ -16284,20 +17152,20 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
},
},
},
- "id": "id273",
+ "id": "id24",
},
{
"appState": AppStateDelta {
"delta": Delta {
"deleted": {
"selectedElementIds": {
- "id262": true,
+ "id13": true,
},
- "selectedLinearElementId": "id262",
+ "selectedLinearElementId": "id13",
},
"inserted": {
"selectedElementIds": {
- "id249": true,
+ "id0": true,
},
"selectedLinearElementId": null,
},
@@ -16306,7 +17174,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
"elements": {
"added": {},
"removed": {
- "id262": {
+ "id13": {
"deleted": {
"angle": 0,
"backgroundColor": "transparent",
@@ -16315,7 +17183,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
"elbowed": false,
"endArrowhead": "arrow",
"endBinding": {
- "elementId": "id251",
+ "elementId": "id2",
"focus": -0,
"gap": 1,
},
@@ -16345,7 +17213,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
},
"startArrowhead": null,
"startBinding": {
- "elementId": "id249",
+ "elementId": "id0",
"focus": 0,
"gap": 1,
},
@@ -16365,11 +17233,11 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
},
},
"updated": {
- "id249": {
+ "id0": {
"deleted": {
"boundElements": [
{
- "id": "id262",
+ "id": "id13",
"type": "arrow",
},
],
@@ -16380,7 +17248,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
"version": 9,
},
},
- "id250": {
+ "id1": {
"deleted": {
"version": 12,
},
@@ -16388,11 +17256,11 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
"version": 10,
},
},
- "id251": {
+ "id2": {
"deleted": {
"boundElements": [
{
- "id": "id262",
+ "id": "id13",
"type": "arrow",
},
],
@@ -16405,7 +17273,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
},
},
},
- "id": "id274",
+ "id": "id25",
},
]
`;
@@ -16496,7 +17364,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
"scrollY": 0,
"searchMatches": null,
"selectedElementIds": {
- "id275": true,
+ "id0": true,
},
"selectedElementsAreBeingDragged": false,
"selectedGroupIds": {},
@@ -16530,11 +17398,11 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
"backgroundColor": "transparent",
"boundElements": [
{
- "id": "id288",
+ "id": "id13",
"type": "arrow",
},
{
- "id": "id276",
+ "id": "id1",
"type": "text",
},
],
@@ -16543,7 +17411,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
"frameId": null,
"groupIds": [],
"height": 100,
- "id": "id275",
+ "id": "id0",
"index": "a0",
"isDeleted": false,
"link": null,
@@ -16569,7 +17437,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
"autoResize": true,
"backgroundColor": "transparent",
"boundElements": null,
- "containerId": "id275",
+ "containerId": "id0",
"customData": undefined,
"fillStyle": "solid",
"fontFamily": 5,
@@ -16577,7 +17445,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
"frameId": null,
"groupIds": [],
"height": 25,
- "id": "id276",
+ "id": "id1",
"index": "a1",
"isDeleted": false,
"lineHeight": "1.25000",
@@ -16608,7 +17476,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
"backgroundColor": "transparent",
"boundElements": [
{
- "id": "id288",
+ "id": "id13",
"type": "arrow",
},
],
@@ -16617,7 +17485,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
"frameId": null,
"groupIds": [],
"height": 100,
- "id": "id277",
+ "id": "id2",
"index": "a2",
"isDeleted": false,
"link": null,
@@ -16646,7 +17514,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
"elbowed": false,
"endArrowhead": "arrow",
"endBinding": {
- "elementId": "id277",
+ "elementId": "id2",
"focus": -0,
"gap": 1,
},
@@ -16654,7 +17522,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
"frameId": null,
"groupIds": [],
"height": 0,
- "id": "id288",
+ "id": "id13",
"index": "a3",
"isDeleted": false,
"lastCommittedPoint": null,
@@ -16677,7 +17545,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
},
"startArrowhead": null,
"startBinding": {
- "elementId": "id275",
+ "elementId": "id0",
"focus": 0,
"gap": 1,
},
@@ -16704,7 +17572,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
"delta": Delta {
"deleted": {
"selectedElementIds": {
- "id275": true,
+ "id0": true,
},
},
"inserted": {
@@ -16715,7 +17583,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
"elements": {
"added": {},
"removed": {
- "id275": {
+ "id0": {
"deleted": {
"isDeleted": false,
"version": 8,
@@ -16725,7 +17593,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
"version": 5,
},
},
- "id276": {
+ "id1": {
"deleted": {
"isDeleted": false,
"version": 8,
@@ -16737,18 +17605,10 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
},
},
"updated": {
- "id277": {
- "deleted": {
- "version": 5,
- },
- "inserted": {
- "version": 3,
- },
- },
- "id288": {
+ "id13": {
"deleted": {
"startBinding": {
- "elementId": "id275",
+ "elementId": "id0",
"focus": 0,
"gap": 1,
},
@@ -16759,9 +17619,17 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
"version": 7,
},
},
+ "id2": {
+ "deleted": {
+ "version": 5,
+ },
+ "inserted": {
+ "version": 3,
+ },
+ },
},
},
- "id": "id296",
+ "id": "id21",
},
]
`;
@@ -16778,7 +17646,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
"elements": {
"added": {},
"removed": {
- "id275": {
+ "id0": {
"deleted": {
"angle": 0,
"backgroundColor": "transparent",
@@ -16809,7 +17677,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
"version": 1,
},
},
- "id276": {
+ "id1": {
"deleted": {
"angle": 0,
"autoResize": true,
@@ -16849,7 +17717,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
"version": 1,
},
},
- "id277": {
+ "id2": {
"deleted": {
"angle": 0,
"backgroundColor": "transparent",
@@ -16883,14 +17751,14 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
},
"updated": {},
},
- "id": "id279",
+ "id": "id4",
},
{
"appState": AppStateDelta {
"delta": Delta {
"deleted": {
"selectedElementIds": {
- "id275": true,
+ "id0": true,
},
},
"inserted": {
@@ -16903,14 +17771,14 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
"removed": {},
"updated": {},
},
- "id": "id282",
+ "id": "id7",
},
{
"appState": AppStateDelta {
"delta": Delta {
"deleted": {
"selectedElementIds": {
- "id276": true,
+ "id1": true,
},
},
"inserted": {
@@ -16923,7 +17791,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
"removed": {},
"updated": {},
},
- "id": "id285",
+ "id": "id10",
},
{
"appState": AppStateDelta {
@@ -16933,7 +17801,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
},
"inserted": {
"selectedElementIds": {
- "id276": true,
+ "id1": true,
},
},
},
@@ -16942,11 +17810,11 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
"added": {},
"removed": {},
"updated": {
- "id275": {
+ "id0": {
"deleted": {
"boundElements": [
{
- "id": "id276",
+ "id": "id1",
"type": "text",
},
],
@@ -16957,9 +17825,9 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
"version": 2,
},
},
- "id276": {
+ "id1": {
"deleted": {
- "containerId": "id275",
+ "containerId": "id0",
"height": 25,
"textAlign": "center",
"version": 4,
@@ -16981,20 +17849,20 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
},
},
},
- "id": "id287",
+ "id": "id12",
},
{
"appState": AppStateDelta {
"delta": Delta {
"deleted": {
"selectedElementIds": {
- "id288": true,
+ "id13": true,
},
- "selectedLinearElementId": "id288",
+ "selectedLinearElementId": "id13",
},
"inserted": {
"selectedElementIds": {
- "id275": true,
+ "id0": true,
},
"selectedLinearElementId": null,
},
@@ -17003,7 +17871,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
"elements": {
"added": {},
"removed": {
- "id288": {
+ "id13": {
"deleted": {
"angle": 0,
"backgroundColor": "transparent",
@@ -17012,7 +17880,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
"elbowed": false,
"endArrowhead": "arrow",
"endBinding": {
- "elementId": "id277",
+ "elementId": "id2",
"focus": -0,
"gap": 1,
},
@@ -17042,7 +17910,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
},
"startArrowhead": null,
"startBinding": {
- "elementId": "id275",
+ "elementId": "id0",
"focus": 0,
"gap": 1,
},
@@ -17062,11 +17930,11 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
},
},
"updated": {
- "id275": {
+ "id0": {
"deleted": {
"boundElements": [
{
- "id": "id288",
+ "id": "id13",
"type": "arrow",
},
],
@@ -17077,11 +17945,11 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
"version": 3,
},
},
- "id277": {
+ "id2": {
"deleted": {
"boundElements": [
{
- "id": "id288",
+ "id": "id13",
"type": "arrow",
},
],
@@ -17094,22 +17962,22 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
},
},
},
- "id": "id290",
+ "id": "id15",
},
{
"appState": AppStateDelta {
"delta": Delta {
"deleted": {
"selectedElementIds": {
- "id275": true,
+ "id0": true,
},
"selectedLinearElementId": null,
},
"inserted": {
"selectedElementIds": {
- "id288": true,
+ "id13": true,
},
- "selectedLinearElementId": "id288",
+ "selectedLinearElementId": "id13",
},
},
},
@@ -17118,7 +17986,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
"removed": {},
"updated": {},
},
- "id": "id293",
+ "id": "id18",
},
]
`;
@@ -17204,15 +18072,15 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
"penMode": false,
"pendingImageElementId": null,
"previousSelectedElementIds": {
- "id297": true,
+ "id0": true,
},
"resizingElement": null,
"scrollX": 0,
"scrollY": 0,
"searchMatches": null,
"selectedElementIds": {
- "id297": true,
- "id299": true,
+ "id0": true,
+ "id2": true,
},
"selectedElementsAreBeingDragged": false,
"selectedGroupIds": {},
@@ -17246,11 +18114,11 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
"backgroundColor": "transparent",
"boundElements": [
{
- "id": "id310",
+ "id": "id13",
"type": "arrow",
},
{
- "id": "id298",
+ "id": "id1",
"type": "text",
},
],
@@ -17259,7 +18127,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
"frameId": null,
"groupIds": [],
"height": 100,
- "id": "id297",
+ "id": "id0",
"index": "a0",
"isDeleted": false,
"link": null,
@@ -17285,7 +18153,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
"autoResize": true,
"backgroundColor": "transparent",
"boundElements": null,
- "containerId": "id297",
+ "containerId": "id0",
"customData": undefined,
"fillStyle": "solid",
"fontFamily": 5,
@@ -17293,7 +18161,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
"frameId": null,
"groupIds": [],
"height": 25,
- "id": "id298",
+ "id": "id1",
"index": "a1",
"isDeleted": false,
"lineHeight": "1.25000",
@@ -17324,7 +18192,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
"backgroundColor": "transparent",
"boundElements": [
{
- "id": "id310",
+ "id": "id13",
"type": "arrow",
},
],
@@ -17333,7 +18201,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
"frameId": null,
"groupIds": [],
"height": 100,
- "id": "id299",
+ "id": "id2",
"index": "a2",
"isDeleted": false,
"link": null,
@@ -17362,7 +18230,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
"elbowed": false,
"endArrowhead": "arrow",
"endBinding": {
- "elementId": "id299",
+ "elementId": "id2",
"focus": -0,
"gap": 1,
},
@@ -17370,7 +18238,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
"frameId": null,
"groupIds": [],
"height": 0,
- "id": "id310",
+ "id": "id13",
"index": "a3",
"isDeleted": false,
"lastCommittedPoint": null,
@@ -17393,7 +18261,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
},
"startArrowhead": null,
"startBinding": {
- "elementId": "id297",
+ "elementId": "id0",
"focus": 0,
"gap": 1,
},
@@ -17420,8 +18288,8 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
"delta": Delta {
"deleted": {
"selectedElementIds": {
- "id297": true,
- "id299": true,
+ "id0": true,
+ "id2": true,
},
},
"inserted": {
@@ -17432,7 +18300,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
"elements": {
"added": {},
"removed": {
- "id297": {
+ "id0": {
"deleted": {
"isDeleted": false,
"version": 8,
@@ -17442,7 +18310,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
"version": 5,
},
},
- "id298": {
+ "id1": {
"deleted": {
"isDeleted": false,
"version": 8,
@@ -17452,7 +18320,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
"version": 5,
},
},
- "id299": {
+ "id2": {
"deleted": {
"isDeleted": false,
"version": 5,
@@ -17464,15 +18332,15 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
},
},
"updated": {
- "id310": {
+ "id13": {
"deleted": {
"endBinding": {
- "elementId": "id299",
+ "elementId": "id2",
"focus": -0,
"gap": 1,
},
"startBinding": {
- "elementId": "id297",
+ "elementId": "id0",
"focus": 0,
"gap": 1,
},
@@ -17486,7 +18354,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
},
},
},
- "id": "id321",
+ "id": "id24",
},
]
`;
@@ -17503,7 +18371,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
"elements": {
"added": {},
"removed": {
- "id297": {
+ "id0": {
"deleted": {
"angle": 0,
"backgroundColor": "transparent",
@@ -17534,7 +18402,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
"version": 1,
},
},
- "id298": {
+ "id1": {
"deleted": {
"angle": 0,
"autoResize": true,
@@ -17574,7 +18442,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
"version": 1,
},
},
- "id299": {
+ "id2": {
"deleted": {
"angle": 0,
"backgroundColor": "transparent",
@@ -17608,14 +18476,14 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
},
"updated": {},
},
- "id": "id301",
+ "id": "id4",
},
{
"appState": AppStateDelta {
"delta": Delta {
"deleted": {
"selectedElementIds": {
- "id297": true,
+ "id0": true,
},
},
"inserted": {
@@ -17628,14 +18496,14 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
"removed": {},
"updated": {},
},
- "id": "id304",
+ "id": "id7",
},
{
"appState": AppStateDelta {
"delta": Delta {
"deleted": {
"selectedElementIds": {
- "id298": true,
+ "id1": true,
},
},
"inserted": {
@@ -17648,7 +18516,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
"removed": {},
"updated": {},
},
- "id": "id307",
+ "id": "id10",
},
{
"appState": AppStateDelta {
@@ -17658,7 +18526,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
},
"inserted": {
"selectedElementIds": {
- "id298": true,
+ "id1": true,
},
},
},
@@ -17667,11 +18535,11 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
"added": {},
"removed": {},
"updated": {
- "id297": {
+ "id0": {
"deleted": {
"boundElements": [
{
- "id": "id298",
+ "id": "id1",
"type": "text",
},
],
@@ -17682,9 +18550,9 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
"version": 2,
},
},
- "id298": {
+ "id1": {
"deleted": {
- "containerId": "id297",
+ "containerId": "id0",
"height": 25,
"textAlign": "center",
"version": 4,
@@ -17706,20 +18574,20 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
},
},
},
- "id": "id309",
+ "id": "id12",
},
{
"appState": AppStateDelta {
"delta": Delta {
"deleted": {
"selectedElementIds": {
- "id310": true,
+ "id13": true,
},
- "selectedLinearElementId": "id310",
+ "selectedLinearElementId": "id13",
},
"inserted": {
"selectedElementIds": {
- "id297": true,
+ "id0": true,
},
"selectedLinearElementId": null,
},
@@ -17728,7 +18596,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
"elements": {
"added": {},
"removed": {
- "id310": {
+ "id13": {
"deleted": {
"angle": 0,
"backgroundColor": "transparent",
@@ -17737,7 +18605,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
"elbowed": false,
"endArrowhead": "arrow",
"endBinding": {
- "elementId": "id299",
+ "elementId": "id2",
"focus": -0,
"gap": 1,
},
@@ -17767,7 +18635,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
},
"startArrowhead": null,
"startBinding": {
- "elementId": "id297",
+ "elementId": "id0",
"focus": 0,
"gap": 1,
},
@@ -17787,11 +18655,11 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
},
},
"updated": {
- "id297": {
+ "id0": {
"deleted": {
"boundElements": [
{
- "id": "id310",
+ "id": "id13",
"type": "arrow",
},
],
@@ -17802,11 +18670,11 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
"version": 3,
},
},
- "id299": {
+ "id2": {
"deleted": {
"boundElements": [
{
- "id": "id310",
+ "id": "id13",
"type": "arrow",
},
],
@@ -17819,22 +18687,22 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
},
},
},
- "id": "id312",
+ "id": "id15",
},
{
"appState": AppStateDelta {
"delta": Delta {
"deleted": {
"selectedElementIds": {
- "id297": true,
+ "id0": true,
},
"selectedLinearElementId": null,
},
"inserted": {
"selectedElementIds": {
- "id310": true,
+ "id13": true,
},
- "selectedLinearElementId": "id310",
+ "selectedLinearElementId": "id13",
},
},
},
@@ -17843,14 +18711,14 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
"removed": {},
"updated": {},
},
- "id": "id315",
+ "id": "id18",
},
{
"appState": AppStateDelta {
"delta": Delta {
"deleted": {
"selectedElementIds": {
- "id299": true,
+ "id2": true,
},
},
"inserted": {
@@ -17863,7 +18731,7 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding
"removed": {},
"updated": {},
},
- "id": "id318",
+ "id": "id21",
},
]
`;
@@ -17949,15 +18817,15 @@ exports[`history > singleplayer undo/redo > should support changes in elements'
"penMode": false,
"pendingImageElementId": null,
"previousSelectedElementIds": {
- "id189": true,
+ "id0": true,
},
"resizingElement": null,
"scrollX": 0,
"scrollY": 0,
"searchMatches": null,
"selectedElementIds": {
- "id189": true,
- "id195": true,
+ "id0": true,
+ "id6": true,
},
"selectedElementsAreBeingDragged": false,
"selectedGroupIds": {},
@@ -17995,7 +18863,7 @@ exports[`history > singleplayer undo/redo > should support changes in elements'
"frameId": null,
"groupIds": [],
"height": 10,
- "id": "id192",
+ "id": "id3",
"index": "a1",
"isDeleted": false,
"link": null,
@@ -18025,7 +18893,7 @@ exports[`history > singleplayer undo/redo > should support changes in elements'
"frameId": null,
"groupIds": [],
"height": 10,
- "id": "id189",
+ "id": "id0",
"index": "a2",
"isDeleted": false,
"link": null,
@@ -18055,7 +18923,7 @@ exports[`history > singleplayer undo/redo > should support changes in elements'
"frameId": null,
"groupIds": [],
"height": 10,
- "id": "id195",
+ "id": "id6",
"index": "a3",
"isDeleted": false,
"link": null,
@@ -18088,7 +18956,7 @@ exports[`history > singleplayer undo/redo > should support changes in elements'
"delta": Delta {
"deleted": {
"selectedElementIds": {
- "id189": true,
+ "id0": true,
},
},
"inserted": {
@@ -18099,7 +18967,7 @@ exports[`history > singleplayer undo/redo > should support changes in elements'
"elements": {
"added": {},
"removed": {
- "id189": {
+ "id0": {
"deleted": {
"angle": 0,
"backgroundColor": "transparent",
@@ -18133,19 +19001,19 @@ exports[`history > singleplayer undo/redo > should support changes in elements'
},
"updated": {},
},
- "id": "id191",
+ "id": "id2",
},
{
"appState": AppStateDelta {
"delta": Delta {
"deleted": {
"selectedElementIds": {
- "id192": true,
+ "id3": true,
},
},
"inserted": {
"selectedElementIds": {
- "id189": true,
+ "id0": true,
},
},
},
@@ -18153,7 +19021,7 @@ exports[`history > singleplayer undo/redo > should support changes in elements'
"elements": {
"added": {},
"removed": {
- "id192": {
+ "id3": {
"deleted": {
"angle": 0,
"backgroundColor": "transparent",
@@ -18187,19 +19055,19 @@ exports[`history > singleplayer undo/redo > should support changes in elements'
},
"updated": {},
},
- "id": "id194",
+ "id": "id5",
},
{
"appState": AppStateDelta {
"delta": Delta {
"deleted": {
"selectedElementIds": {
- "id195": true,
+ "id6": true,
},
},
"inserted": {
"selectedElementIds": {
- "id192": true,
+ "id3": true,
},
},
},
@@ -18207,7 +19075,7 @@ exports[`history > singleplayer undo/redo > should support changes in elements'
"elements": {
"added": {},
"removed": {
- "id195": {
+ "id6": {
"deleted": {
"angle": 0,
"backgroundColor": "transparent",
@@ -18241,7 +19109,7 @@ exports[`history > singleplayer undo/redo > should support changes in elements'
},
"updated": {},
},
- "id": "id197",
+ "id": "id8",
},
{
"appState": AppStateDelta {
@@ -18254,7 +19122,7 @@ exports[`history > singleplayer undo/redo > should support changes in elements'
"added": {},
"removed": {},
"updated": {
- "id195": {
+ "id6": {
"deleted": {
"index": "a0V",
"version": 6,
@@ -18266,19 +19134,19 @@ exports[`history > singleplayer undo/redo > should support changes in elements'
},
},
},
- "id": "id201",
+ "id": "id12",
},
{
"appState": AppStateDelta {
"delta": Delta {
"deleted": {
"selectedElementIds": {
- "id189": true,
+ "id0": true,
},
},
"inserted": {
"selectedElementIds": {
- "id195": true,
+ "id6": true,
},
},
},
@@ -18288,14 +19156,14 @@ exports[`history > singleplayer undo/redo > should support changes in elements'
"removed": {},
"updated": {},
},
- "id": "id204",
+ "id": "id15",
},
{
"appState": AppStateDelta {
"delta": Delta {
"deleted": {
"selectedElementIds": {
- "id195": true,
+ "id6": true,
},
},
"inserted": {
@@ -18308,7 +19176,7 @@ exports[`history > singleplayer undo/redo > should support changes in elements'
"removed": {},
"updated": {},
},
- "id": "id207",
+ "id": "id18",
},
{
"appState": AppStateDelta {
@@ -18321,7 +19189,7 @@ exports[`history > singleplayer undo/redo > should support changes in elements'
"added": {},
"removed": {},
"updated": {
- "id189": {
+ "id0": {
"deleted": {
"index": "a2",
"version": 7,
@@ -18331,7 +19199,7 @@ exports[`history > singleplayer undo/redo > should support changes in elements'
"version": 6,
},
},
- "id195": {
+ "id6": {
"deleted": {
"index": "a3",
"version": 10,
@@ -18343,7 +19211,7 @@ exports[`history > singleplayer undo/redo > should support changes in elements'
},
},
},
- "id": "id211",
+ "id": "id22",
},
]
`;
@@ -18429,19 +19297,19 @@ exports[`history > singleplayer undo/redo > should support duplication of groups
"penMode": false,
"pendingImageElementId": null,
"previousSelectedElementIds": {
- "id161": true,
+ "id1": true,
},
"resizingElement": null,
"scrollX": 0,
"scrollY": 0,
"searchMatches": null,
"selectedElementIds": {
- "id184": true,
- "id186": true,
+ "id24": true,
+ "id26": true,
},
"selectedElementsAreBeingDragged": false,
"selectedGroupIds": {
- "id185": true,
+ "id25": true,
},
"selectionElement": null,
"shouldCacheIgnoreZoom": false,
@@ -18479,7 +19347,7 @@ exports[`history > singleplayer undo/redo > should support duplication of groups
"A",
],
"height": 100,
- "id": "id160",
+ "id": "id0",
"index": "a0",
"isDeleted": false,
"link": null,
@@ -18511,7 +19379,7 @@ exports[`history > singleplayer undo/redo > should support duplication of groups
"A",
],
"height": 100,
- "id": "id161",
+ "id": "id1",
"index": "a1",
"isDeleted": false,
"link": null,
@@ -18540,10 +19408,10 @@ exports[`history > singleplayer undo/redo > should support duplication of groups
"fillStyle": "solid",
"frameId": null,
"groupIds": [
- "id185",
+ "id25",
],
"height": 100,
- "id": "id184",
+ "id": "id24",
"index": "a1G",
"isDeleted": false,
"link": null,
@@ -18572,10 +19440,10 @@ exports[`history > singleplayer undo/redo > should support duplication of groups
"fillStyle": "solid",
"frameId": null,
"groupIds": [
- "id185",
+ "id25",
],
"height": 100,
- "id": "id186",
+ "id": "id26",
"index": "a1V",
"isDeleted": false,
"link": null,
@@ -18604,10 +19472,10 @@ exports[`history > singleplayer undo/redo > should support duplication of groups
"fillStyle": "solid",
"frameId": null,
"groupIds": [
- "id177",
+ "id17",
],
"height": 100,
- "id": "id176",
+ "id": "id16",
"index": "a2",
"isDeleted": true,
"link": null,
@@ -18636,10 +19504,10 @@ exports[`history > singleplayer undo/redo > should support duplication of groups
"fillStyle": "solid",
"frameId": null,
"groupIds": [
- "id177",
+ "id17",
],
"height": 100,
- "id": "id178",
+ "id": "id18",
"index": "a3",
"isDeleted": true,
"link": null,
@@ -18672,8 +19540,8 @@ exports[`history > singleplayer undo/redo > should support duplication of groups
"delta": Delta {
"deleted": {
"selectedElementIds": {
- "id160": true,
- "id161": true,
+ "id0": true,
+ "id1": true,
},
"selectedGroupIds": {
"A": true,
@@ -18688,7 +19556,7 @@ exports[`history > singleplayer undo/redo > should support duplication of groups
"elements": {
"added": {},
"removed": {
- "id160": {
+ "id0": {
"deleted": {
"angle": 0,
"backgroundColor": "transparent",
@@ -18721,7 +19589,7 @@ exports[`history > singleplayer undo/redo > should support duplication of groups
"version": 1,
},
},
- "id161": {
+ "id1": {
"deleted": {
"angle": 0,
"backgroundColor": "transparent",
@@ -18757,24 +19625,24 @@ exports[`history > singleplayer undo/redo > should support duplication of groups
},
"updated": {},
},
- "id": "id164",
+ "id": "id4",
},
{
"appState": AppStateDelta {
"delta": Delta {
"deleted": {
"selectedElementIds": {
- "id184": true,
- "id186": true,
+ "id24": true,
+ "id26": true,
},
"selectedGroupIds": {
- "id185": true,
+ "id25": true,
},
},
"inserted": {
"selectedElementIds": {
- "id160": true,
- "id161": true,
+ "id0": true,
+ "id1": true,
},
"selectedGroupIds": {
"A": true,
@@ -18785,7 +19653,7 @@ exports[`history > singleplayer undo/redo > should support duplication of groups
"elements": {
"added": {},
"removed": {
- "id184": {
+ "id24": {
"deleted": {
"angle": 0,
"backgroundColor": "transparent",
@@ -18794,7 +19662,7 @@ exports[`history > singleplayer undo/redo > should support duplication of groups
"fillStyle": "solid",
"frameId": null,
"groupIds": [
- "id185",
+ "id25",
],
"height": 100,
"index": "a1G",
@@ -18818,7 +19686,7 @@ exports[`history > singleplayer undo/redo > should support duplication of groups
"version": 3,
},
},
- "id186": {
+ "id26": {
"deleted": {
"angle": 0,
"backgroundColor": "transparent",
@@ -18827,7 +19695,7 @@ exports[`history > singleplayer undo/redo > should support duplication of groups
"fillStyle": "solid",
"frameId": null,
"groupIds": [
- "id185",
+ "id25",
],
"height": 100,
"index": "a1V",
@@ -18854,7 +19722,7 @@ exports[`history > singleplayer undo/redo > should support duplication of groups
},
"updated": {},
},
- "id": "id188",
+ "id": "id28",
},
]
`;
@@ -18940,7 +19808,7 @@ exports[`history > singleplayer undo/redo > should support element creation, del
"penMode": false,
"pendingImageElementId": null,
"previousSelectedElementIds": {
- "id93": true,
+ "id3": true,
},
"resizingElement": null,
"scrollX": 0,
@@ -18983,7 +19851,7 @@ exports[`history > singleplayer undo/redo > should support element creation, del
"frameId": null,
"groupIds": [],
"height": 10,
- "id": "id90",
+ "id": "id0",
"index": "a0",
"isDeleted": false,
"link": null,
@@ -19013,7 +19881,7 @@ exports[`history > singleplayer undo/redo > should support element creation, del
"frameId": null,
"groupIds": [],
"height": 10,
- "id": "id93",
+ "id": "id3",
"index": "a1",
"isDeleted": true,
"link": null,
@@ -19043,7 +19911,7 @@ exports[`history > singleplayer undo/redo > should support element creation, del
"frameId": null,
"groupIds": [],
"height": 10,
- "id": "id96",
+ "id": "id6",
"index": "a2",
"isDeleted": true,
"link": null,
@@ -19076,7 +19944,7 @@ exports[`history > singleplayer undo/redo > should support element creation, del
"delta": Delta {
"deleted": {
"selectedElementIds": {
- "id90": true,
+ "id0": true,
},
},
"inserted": {
@@ -19087,7 +19955,7 @@ exports[`history > singleplayer undo/redo > should support element creation, del
"elements": {
"added": {},
"removed": {
- "id90": {
+ "id0": {
"deleted": {
"angle": 0,
"backgroundColor": "transparent",
@@ -19121,19 +19989,19 @@ exports[`history > singleplayer undo/redo > should support element creation, del
},
"updated": {},
},
- "id": "id113",
+ "id": "id23",
},
{
"appState": AppStateDelta {
"delta": Delta {
"deleted": {
"selectedElementIds": {
- "id93": true,
+ "id3": true,
},
},
"inserted": {
"selectedElementIds": {
- "id90": true,
+ "id0": true,
},
},
},
@@ -19141,7 +20009,7 @@ exports[`history > singleplayer undo/redo > should support element creation, del
"elements": {
"added": {},
"removed": {
- "id93": {
+ "id3": {
"deleted": {
"angle": 0,
"backgroundColor": "transparent",
@@ -19175,19 +20043,19 @@ exports[`history > singleplayer undo/redo > should support element creation, del
},
"updated": {},
},
- "id": "id114",
+ "id": "id24",
},
{
"appState": AppStateDelta {
"delta": Delta {
"deleted": {
"selectedElementIds": {
- "id96": true,
+ "id6": true,
},
},
"inserted": {
"selectedElementIds": {
- "id93": true,
+ "id3": true,
},
},
},
@@ -19195,7 +20063,7 @@ exports[`history > singleplayer undo/redo > should support element creation, del
"elements": {
"added": {},
"removed": {
- "id96": {
+ "id6": {
"deleted": {
"angle": 0,
"backgroundColor": "transparent",
@@ -19229,19 +20097,19 @@ exports[`history > singleplayer undo/redo > should support element creation, del
},
"updated": {},
},
- "id": "id115",
+ "id": "id25",
},
{
"appState": AppStateDelta {
"delta": Delta {
"deleted": {
"selectedElementIds": {
- "id93": true,
+ "id3": true,
},
},
"inserted": {
"selectedElementIds": {
- "id96": true,
+ "id6": true,
},
},
},
@@ -19251,14 +20119,14 @@ exports[`history > singleplayer undo/redo > should support element creation, del
"removed": {},
"updated": {},
},
- "id": "id116",
+ "id": "id26",
},
{
"appState": AppStateDelta {
"delta": Delta {
"deleted": {
"selectedElementIds": {
- "id96": true,
+ "id6": true,
},
},
"inserted": {
@@ -19271,7 +20139,7 @@ exports[`history > singleplayer undo/redo > should support element creation, del
"removed": {},
"updated": {},
},
- "id": "id117",
+ "id": "id27",
},
{
"appState": AppStateDelta {
@@ -19281,15 +20149,15 @@ exports[`history > singleplayer undo/redo > should support element creation, del
},
"inserted": {
"selectedElementIds": {
- "id93": true,
- "id96": true,
+ "id3": true,
+ "id6": true,
},
},
},
},
"elements": {
"added": {
- "id93": {
+ "id3": {
"deleted": {
"isDeleted": true,
"version": 8,
@@ -19299,7 +20167,7 @@ exports[`history > singleplayer undo/redo > should support element creation, del
"version": 7,
},
},
- "id96": {
+ "id6": {
"deleted": {
"isDeleted": true,
"version": 8,
@@ -19313,7 +20181,7 @@ exports[`history > singleplayer undo/redo > should support element creation, del
"removed": {},
"updated": {},
},
- "id": "id118",
+ "id": "id28",
},
]
`;
@@ -19399,14 +20267,14 @@ exports[`history > singleplayer undo/redo > should support linear element creati
"penMode": false,
"pendingImageElementId": null,
"previousSelectedElementIds": {
- "id119": true,
+ "id0": true,
},
"resizingElement": null,
"scrollX": 0,
"scrollY": 0,
"searchMatches": null,
"selectedElementIds": {
- "id119": true,
+ "id0": true,
},
"selectedElementsAreBeingDragged": false,
"selectedGroupIds": {},
@@ -19447,7 +20315,7 @@ exports[`history > singleplayer undo/redo > should support linear element creati
"frameId": null,
"groupIds": [],
"height": 20,
- "id": "id119",
+ "id": "id0",
"index": "a0",
"isDeleted": false,
"lastCommittedPoint": [
@@ -19502,7 +20370,7 @@ exports[`history > singleplayer undo/redo > should support linear element creati
"delta": Delta {
"deleted": {
"selectedElementIds": {
- "id119": true,
+ "id0": true,
},
},
"inserted": {
@@ -19513,7 +20381,7 @@ exports[`history > singleplayer undo/redo > should support linear element creati
"elements": {
"added": {},
"removed": {
- "id119": {
+ "id0": {
"deleted": {
"angle": 0,
"backgroundColor": "transparent",
@@ -19568,7 +20436,7 @@ exports[`history > singleplayer undo/redo > should support linear element creati
},
"updated": {},
},
- "id": "id142",
+ "id": "id23",
},
{
"appState": AppStateDelta {
@@ -19581,7 +20449,7 @@ exports[`history > singleplayer undo/redo > should support linear element creati
"added": {},
"removed": {},
"updated": {
- "id119": {
+ "id0": {
"deleted": {
"lastCommittedPoint": [
20,
@@ -19625,13 +20493,13 @@ exports[`history > singleplayer undo/redo > should support linear element creati
},
},
},
- "id": "id143",
+ "id": "id24",
},
{
"appState": AppStateDelta {
"delta": Delta {
"deleted": {
- "selectedLinearElementId": "id119",
+ "selectedLinearElementId": "id0",
},
"inserted": {
"selectedLinearElementId": null,
@@ -19643,13 +20511,13 @@ exports[`history > singleplayer undo/redo > should support linear element creati
"removed": {},
"updated": {},
},
- "id": "id144",
+ "id": "id25",
},
{
"appState": AppStateDelta {
"delta": Delta {
"deleted": {
- "editingLinearElementId": "id119",
+ "editingLinearElementId": "id0",
},
"inserted": {
"editingLinearElementId": null,
@@ -19661,7 +20529,7 @@ exports[`history > singleplayer undo/redo > should support linear element creati
"removed": {},
"updated": {},
},
- "id": "id145",
+ "id": "id26",
},
{
"appState": AppStateDelta {
@@ -19674,7 +20542,7 @@ exports[`history > singleplayer undo/redo > should support linear element creati
"added": {},
"removed": {},
"updated": {
- "id119": {
+ "id0": {
"deleted": {
"height": 20,
"points": [
@@ -19714,7 +20582,7 @@ exports[`history > singleplayer undo/redo > should support linear element creati
},
},
},
- "id": "id146",
+ "id": "id27",
},
{
"appState": AppStateDelta {
@@ -19723,7 +20591,7 @@ exports[`history > singleplayer undo/redo > should support linear element creati
"editingLinearElementId": null,
},
"inserted": {
- "editingLinearElementId": "id119",
+ "editingLinearElementId": "id0",
},
},
},
@@ -19732,7 +20600,7 @@ exports[`history > singleplayer undo/redo > should support linear element creati
"removed": {},
"updated": {},
},
- "id": "id147",
+ "id": "id28",
},
]
`;
diff --git a/packages/excalidraw/tests/helpers/api.ts b/packages/excalidraw/tests/helpers/api.ts
index 9c1ac99139..f378079534 100644
--- a/packages/excalidraw/tests/helpers/api.ts
+++ b/packages/excalidraw/tests/helpers/api.ts
@@ -499,13 +499,21 @@ export class API {
value: {
files,
getData: (type: string) => {
- if (type === blob.type) {
+ if (type === blob.type || type === "text") {
return text;
}
return "";
},
+ types: [blob.type],
},
});
+ Object.defineProperty(fileDropEvent, "clientX", {
+ value: 0,
+ });
+ Object.defineProperty(fileDropEvent, "clientY", {
+ value: 0,
+ });
+
await fireEvent(GlobalTestState.interactiveCanvas, fileDropEvent);
};
diff --git a/packages/excalidraw/tests/helpers/mocks.ts b/packages/excalidraw/tests/helpers/mocks.ts
index 10e1dee2b4..e7fa629111 100644
--- a/packages/excalidraw/tests/helpers/mocks.ts
+++ b/packages/excalidraw/tests/helpers/mocks.ts
@@ -31,3 +31,30 @@ export const mockMermaidToExcalidraw = (opts: {
});
}
};
+
+// Mock for HTMLImageElement (use with `vi.unstubAllGlobals()`)
+// as jsdom.resources: "usable" throws an error on image load
+export const mockHTMLImageElement = (
+ naturalWidth: number,
+ naturalHeight: number,
+) => {
+ vi.stubGlobal(
+ "Image",
+ class extends Image {
+ constructor() {
+ super();
+
+ Object.defineProperty(this, "naturalWidth", {
+ value: naturalWidth,
+ });
+ Object.defineProperty(this, "naturalHeight", {
+ value: naturalHeight,
+ });
+
+ queueMicrotask(() => {
+ this.onload?.({} as Event);
+ });
+ }
+ },
+ );
+};
diff --git a/packages/excalidraw/tests/history.test.tsx b/packages/excalidraw/tests/history.test.tsx
index 328dab7c4f..c2da254543 100644
--- a/packages/excalidraw/tests/history.test.tsx
+++ b/packages/excalidraw/tests/history.test.tsx
@@ -19,6 +19,7 @@ import {
COLOR_PALETTE,
DEFAULT_ELEMENT_BACKGROUND_COLOR_INDEX,
DEFAULT_ELEMENT_STROKE_COLOR_INDEX,
+ reseed,
} from "@excalidraw/common";
import "@excalidraw/utils/test-utils";
@@ -35,6 +36,7 @@ import type {
ExcalidrawGenericElement,
ExcalidrawLinearElement,
ExcalidrawTextElement,
+ FileId,
FixedPointBinding,
FractionalIndex,
SceneElementsMap,
@@ -49,12 +51,16 @@ import {
} from "../actions";
import { createUndoAction, createRedoAction } from "../actions/actionHistory";
import { actionToggleViewMode } from "../actions/actionToggleViewMode";
+import * as StaticScene from "../renderer/staticScene";
import { getDefaultAppState } from "../appState";
import { Excalidraw } from "../index";
-import * as StaticScene from "../renderer/staticScene";
+import { createPasteEvent } from "../clipboard";
+
+import * as blobModule from "../data/blob";
import { API } from "./helpers/api";
import { Keyboard, Pointer, UI } from "./helpers/ui";
+import { mockHTMLImageElement } from "./helpers/mocks";
import {
GlobalTestState,
act,
@@ -63,6 +69,7 @@ import {
togglePopover,
getCloneByOrigId,
checkpointHistory,
+ unmountComponent,
} from "./test-utils";
import type { AppState } from "../types";
@@ -106,7 +113,22 @@ const violet = COLOR_PALETTE.violet[DEFAULT_ELEMENT_BACKGROUND_COLOR_INDEX];
describe("history", () => {
beforeEach(() => {
+ unmountComponent();
renderStaticScene.mockClear();
+ vi.clearAllMocks();
+ vi.unstubAllGlobals();
+
+ reseed(7);
+
+ const generateIdSpy = vi.spyOn(blobModule, "generateIdFromFile");
+ const resizeFileSpy = vi.spyOn(blobModule, "resizeImageFile");
+
+ generateIdSpy.mockImplementation(() => Promise.resolve("fileId" as FileId));
+ resizeFileSpy.mockImplementation((file: File) => Promise.resolve(file));
+
+ Object.assign(document, {
+ elementFromPoint: () => GlobalTestState.canvas,
+ });
});
afterEach(() => {
@@ -559,6 +581,227 @@ describe("history", () => {
]);
});
+ it("should create new history entry on image drag&drop", async () => {
+ await render(<Excalidraw handleKeyboardGlobally={true} />);
+
+ // it's necessary to specify the height in order to calculate natural dimensions of the image
+ h.state.height = 1000;
+
+ const deerImageDimensions = {
+ width: 318,
+ height: 335,
+ };
+
+ mockHTMLImageElement(
+ deerImageDimensions.width,
+ deerImageDimensions.height,
+ );
+
+ await API.drop(await API.loadFile("./fixtures/deer.png"));
+
+ await waitFor(() => {
+ expect(API.getUndoStack().length).toBe(1);
+ expect(API.getRedoStack().length).toBe(0);
+ expect(h.elements).toEqual([
+ expect.objectContaining({
+ type: "image",
+ fileId: expect.any(String),
+ x: expect.toBeNonNaNNumber(),
+ y: expect.toBeNonNaNNumber(),
+ ...deerImageDimensions,
+ }),
+ ]);
+ });
+
+ Keyboard.undo();
+ expect(API.getUndoStack().length).toBe(0);
+ expect(API.getRedoStack().length).toBe(1);
+ expect(h.elements).toEqual([
+ expect.objectContaining({
+ type: "image",
+ fileId: expect.any(String),
+ x: expect.toBeNonNaNNumber(),
+ y: expect.toBeNonNaNNumber(),
+ isDeleted: true,
+ ...deerImageDimensions,
+ }),
+ ]);
+
+ Keyboard.redo();
+ expect(API.getUndoStack().length).toBe(1);
+ expect(API.getRedoStack().length).toBe(0);
+ expect(h.elements).toEqual([
+ expect.objectContaining({
+ type: "image",
+ fileId: expect.any(String),
+ x: expect.toBeNonNaNNumber(),
+ y: expect.toBeNonNaNNumber(),
+ isDeleted: false,
+ ...deerImageDimensions,
+ }),
+ ]);
+ });
+
+ it("should create new history entry on embeddable link drag&drop", async () => {
+ await render(<Excalidraw handleKeyboardGlobally={true} />);
+
+ const link = "https://www.youtube.com/watch?v=gkGMXY0wekg";
+ await API.drop(
+ new Blob([link], {
+ type: MIME_TYPES.text,
+ }),
+ );
+
+ await waitFor(() => {
+ expect(API.getUndoStack().length).toBe(1);
+ expect(API.getRedoStack().length).toBe(0);
+ expect(h.elements).toEqual([
+ expect.objectContaining({
+ type: "embeddable",
+ link,
+ }),
+ ]);
+ });
+
+ Keyboard.undo();
+ expect(API.getUndoStack().length).toBe(0);
+ expect(API.getRedoStack().length).toBe(1);
+ expect(h.elements).toEqual([
+ expect.objectContaining({
+ type: "embeddable",
+ link,
+ isDeleted: true,
+ }),
+ ]);
+
+ Keyboard.redo();
+ expect(API.getUndoStack().length).toBe(1);
+ expect(API.getRedoStack().length).toBe(0);
+ expect(h.elements).toEqual([
+ expect.objectContaining({
+ type: "embeddable",
+ link,
+ isDeleted: false,
+ }),
+ ]);
+ });
+
+ it("should create new history entry on image paste", async () => {
+ await render(
+ <Excalidraw autoFocus={true} handleKeyboardGlobally={true} />,
+ );
+
+ // it's necessary to specify the height in order to calculate natural dimensions of the image
+ h.state.height = 1000;
+
+ const smileyImageDimensions = {
+ width: 56,
+ height: 77,
+ };
+
+ mockHTMLImageElement(
+ smileyImageDimensions.width,
+ smileyImageDimensions.height,
+ );
+
+ document.dispatchEvent(
+ createPasteEvent({
+ files: [await API.loadFile("./fixtures/smiley_embedded_v2.png")],
+ }),
+ );
+
+ await waitFor(() => {
+ expect(API.getUndoStack().length).toBe(1);
+ expect(API.getRedoStack().length).toBe(0);
+ expect(h.elements).toEqual([
+ expect.objectContaining({
+ type: "image",
+ fileId: expect.any(String),
+ x: expect.toBeNonNaNNumber(),
+ y: expect.toBeNonNaNNumber(),
+ ...smileyImageDimensions,
+ }),
+ ]);
+ });
+
+ Keyboard.undo();
+ expect(API.getUndoStack().length).toBe(0);
+ expect(API.getRedoStack().length).toBe(1);
+ expect(h.elements).toEqual([
+ expect.objectContaining({
+ type: "image",
+ fileId: expect.any(String),
+ x: expect.toBeNonNaNNumber(),
+ y: expect.toBeNonNaNNumber(),
+ isDeleted: true,
+ ...smileyImageDimensions,
+ }),
+ ]);
+
+ Keyboard.redo();
+ expect(API.getUndoStack().length).toBe(1);
+ expect(API.getRedoStack().length).toBe(0);
+ expect(h.elements).toEqual([
+ expect.objectContaining({
+ type: "image",
+ fileId: expect.any(String),
+ x: expect.toBeNonNaNNumber(),
+ y: expect.toBeNonNaNNumber(),
+ isDeleted: false,
+ ...smileyImageDimensions,
+ }),
+ ]);
+ });
+
+ it("should create new history entry on embeddable link paste", async () => {
+ await render(
+ <Excalidraw autoFocus={true} handleKeyboardGlobally={true} />,
+ );
+
+ const link = "https://www.youtube.com/watch?v=gkGMXY0wekg";
+
+ document.dispatchEvent(
+ createPasteEvent({
+ types: {
+ "text/plain": link,
+ },
+ }),
+ );
+
+ await waitFor(() => {
+ expect(API.getUndoStack().length).toBe(1);
+ expect(API.getRedoStack().length).toBe(0);
+ expect(h.elements).toEqual([
+ expect.objectContaining({
+ type: "embeddable",
+ link,
+ }),
+ ]);
+ });
+
+ Keyboard.undo();
+ expect(API.getUndoStack().length).toBe(0);
+ expect(API.getRedoStack().length).toBe(1);
+ expect(h.elements).toEqual([
+ expect.objectContaining({
+ type: "embeddable",
+ link,
+ isDeleted: true,
+ }),
+ ]);
+
+ Keyboard.redo();
+ expect(API.getUndoStack().length).toBe(1);
+ expect(API.getRedoStack().length).toBe(0);
+ expect(h.elements).toEqual([
+ expect.objectContaining({
+ type: "embeddable",
+ link,
+ isDeleted: false,
+ }),
+ ]);
+ });
+
it("should support appstate name or viewBackgroundColor change", async () => {
await render(
<Excalidraw