Compare commits

..

5 Commits

Author SHA1 Message Date
Daniel J. Geiger
60bab6a428 feat: Widen ActionName and ShortcutName to include custom.${string} 2023-11-22 15:27:47 -06:00
Barnabás Molnár
7c9cf30909 fix: make zoomToFit fitToViewport account for sidebar (#7298) 2023-11-17 15:56:19 +01:00
David Luzar
1e37dbd60e feat: change frame resizing behavior (#7307) 2023-11-17 14:37:43 +01:00
David Luzar
f8d5c2a1b6 build: allow a range of major node versions (#7306) 2023-11-17 14:23:19 +01:00
Aakansha Doshi
23b24ea5c3 build: use caret for specifying node version to avoid major upgrades automatically (#7297) 2023-11-16 16:18:38 +05:30
24 changed files with 115 additions and 730 deletions

View File

@@ -39,7 +39,7 @@ Since Vite removes env variables by default, you can update the vite config to e
``` ```
define: { define: {
"process.env.IS_PREACT": JSON.stringify("true"), "process.env.IS_PREACT": process.env.IS_PREACT,
}, },
``` ```

View File

@@ -93,7 +93,7 @@ Since Vite removes env variables by default, you can update the vite config to e
``` ```
define: { define: {
"process.env.IS_PREACT": JSON.stringify("true"), "process.env.IS_PREACT": process.env.IS_PREACT,
}, },
``` ```
::: :::

View File

@@ -96,7 +96,7 @@
"vitest-canvas-mock": "0.3.2" "vitest-canvas-mock": "0.3.2"
}, },
"engines": { "engines": {
"node": ">=18.0.0" "node": "18.0.0 - 20.x.x"
}, },
"homepage": ".", "homepage": ".",
"name": "excalidraw", "name": "excalidraw",

View File

@@ -265,7 +265,21 @@ export const zoomToFit = ({
30.0, 30.0,
) as NormalizedZoomValue; ) as NormalizedZoomValue;
scrollX = (appState.width / 2) * (1 / newZoomValue) - centerX; let appStateWidth = appState.width;
if (appState.openSidebar) {
const sidebarDOMElem = document.querySelector(
".sidebar",
) as HTMLElement | null;
const sidebarWidth = sidebarDOMElem?.offsetWidth ?? 0;
const isRTL = document.documentElement.getAttribute("dir") === "rtl";
appStateWidth = !isRTL
? appState.width - sidebarWidth
: appState.width + sidebarWidth;
}
scrollX = (appStateWidth / 2) * (1 / newZoomValue) - centerX;
scrollY = (appState.height / 2) * (1 / newZoomValue) - centerY; scrollY = (appState.height / 2) * (1 / newZoomValue) - centerY;
} else { } else {
newZoomValue = zoomValueToFitBoundsOnViewport(commonBounds, { newZoomValue = zoomValueToFitBoundsOnViewport(commonBounds, {

View File

@@ -2,11 +2,12 @@ import { isDarwin } from "../constants";
import { t } from "../i18n"; import { t } from "../i18n";
import { SubtypeOf } from "../utility-types"; import { SubtypeOf } from "../utility-types";
import { getShortcutKey } from "../utils"; import { getShortcutKey } from "../utils";
import { ActionName } from "./types"; import { ActionName, CustomActionName } from "./types";
export type ShortcutName = export type ShortcutName =
| SubtypeOf< | SubtypeOf<
ActionName, ActionName,
| CustomActionName
| "toggleTheme" | "toggleTheme"
| "loadScene" | "loadScene"
| "clearCanvas" | "clearCanvas"
@@ -40,6 +41,15 @@ export type ShortcutName =
| "saveScene" | "saveScene"
| "imageExport"; | "imageExport";
export const registerCustomShortcuts = (
shortcuts: Record<CustomActionName, string[]>,
) => {
for (const key in shortcuts) {
const shortcut = key as CustomActionName;
shortcutMap[shortcut] = shortcuts[shortcut];
}
};
const shortcutMap: Record<ShortcutName, string[]> = { const shortcutMap: Record<ShortcutName, string[]> = {
toggleTheme: [getShortcutKey("Shift+Alt+D")], toggleTheme: [getShortcutKey("Shift+Alt+D")],
saveScene: [getShortcutKey("CtrlOrCmd+S")], saveScene: [getShortcutKey("CtrlOrCmd+S")],

View File

@@ -35,7 +35,11 @@ type ActionFn = (
export type UpdaterFn = (res: ActionResult) => void; export type UpdaterFn = (res: ActionResult) => void;
export type ActionFilterFn = (action: Action) => void; export type ActionFilterFn = (action: Action) => void;
export const makeCustomActionName = (name: string) =>
`custom.${name}` as CustomActionName;
export type CustomActionName = `custom.${string}`;
export type ActionName = export type ActionName =
| CustomActionName
| "copy" | "copy"
| "cut" | "cut"
| "paste" | "paste"

View File

@@ -946,11 +946,7 @@ class App extends React.Component<AppProps, AppState> {
title="Excalidraw Embedded Content" title="Excalidraw Embedded Content"
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
allowFullScreen={true} allowFullScreen={true}
sandbox={`${ sandbox="allow-same-origin allow-scripts allow-forms allow-popups allow-popups-to-escape-sandbox allow-presentation allow-downloads"
embedLink?.sandbox?.allowSameOrigin
? "allow-same-origin"
: ""
} allow-scripts allow-forms allow-popups allow-popups-to-escape-sandbox allow-presentation allow-downloads`}
/> />
)} )}
</div> </div>
@@ -8321,39 +8317,6 @@ class App extends React.Component<AppProps, AppState> {
const elementsToHighlight = new Set<ExcalidrawElement>(); const elementsToHighlight = new Set<ExcalidrawElement>();
selectedFrames.forEach((frame) => { selectedFrames.forEach((frame) => {
const elementsInFrame = getFrameChildren(
this.scene.getNonDeletedElements(),
frame.id,
);
// keep elements' positions relative to their frames on frames resizing
if (transformHandleType) {
if (transformHandleType.includes("w")) {
elementsInFrame.forEach((element) => {
mutateElement(element, {
x:
frame.x +
(frameElementsOffsetsMap.get(frame.id + element.id)?.x || 0),
y:
frame.y +
(frameElementsOffsetsMap.get(frame.id + element.id)?.y || 0),
});
});
}
if (transformHandleType.includes("n")) {
elementsInFrame.forEach((element) => {
mutateElement(element, {
x:
frame.x +
(frameElementsOffsetsMap.get(frame.id + element.id)?.x || 0),
y:
frame.y +
(frameElementsOffsetsMap.get(frame.id + element.id)?.y || 0),
});
});
}
}
getElementsInResizingFrame( getElementsInResizingFrame(
this.scene.getNonDeletedElements(), this.scene.getNonDeletedElements(),
frame, frame,

View File

@@ -14,7 +14,6 @@ exports[`Test Transform > Test arrow bindings > should bind arrows to existing s
"type": "arrow", "type": "arrow",
}, },
], ],
"customData": undefined,
"fillStyle": "solid", "fillStyle": "solid",
"frameId": null, "frameId": null,
"groupIds": [], "groupIds": [],
@@ -50,7 +49,6 @@ exports[`Test Transform > Test arrow bindings > should bind arrows to existing s
"type": "arrow", "type": "arrow",
}, },
], ],
"customData": undefined,
"fillStyle": "solid", "fillStyle": "solid",
"frameId": null, "frameId": null,
"groupIds": [], "groupIds": [],
@@ -81,7 +79,6 @@ exports[`Test Transform > Test arrow bindings > should bind arrows to existing s
"angle": 0, "angle": 0,
"backgroundColor": "transparent", "backgroundColor": "transparent",
"boundElements": null, "boundElements": null,
"customData": undefined,
"endArrowhead": "arrow", "endArrowhead": "arrow",
"endBinding": { "endBinding": {
"elementId": "ellipse-1", "elementId": "ellipse-1",
@@ -135,7 +132,6 @@ exports[`Test Transform > Test arrow bindings > should bind arrows to existing s
"angle": 0, "angle": 0,
"backgroundColor": "transparent", "backgroundColor": "transparent",
"boundElements": null, "boundElements": null,
"customData": undefined,
"endArrowhead": "arrow", "endArrowhead": "arrow",
"endBinding": { "endBinding": {
"elementId": "ellipse-1", "elementId": "ellipse-1",
@@ -194,7 +190,6 @@ exports[`Test Transform > Test arrow bindings > should bind arrows to existing s
"type": "arrow", "type": "arrow",
}, },
], ],
"customData": undefined,
"fillStyle": "solid", "fillStyle": "solid",
"frameId": null, "frameId": null,
"groupIds": [], "groupIds": [],
@@ -232,7 +227,6 @@ exports[`Test Transform > Test arrow bindings > should bind arrows to existing t
}, },
], ],
"containerId": null, "containerId": null,
"customData": undefined,
"fillStyle": "solid", "fillStyle": "solid",
"fontFamily": 1, "fontFamily": 1,
"fontSize": 20, "fontSize": 20,
@@ -277,7 +271,6 @@ exports[`Test Transform > Test arrow bindings > should bind arrows to existing t
}, },
], ],
"containerId": null, "containerId": null,
"customData": undefined,
"fillStyle": "solid", "fillStyle": "solid",
"fontFamily": 1, "fontFamily": 1,
"fontSize": 20, "fontSize": 20,
@@ -320,7 +313,6 @@ exports[`Test Transform > Test arrow bindings > should bind arrows to existing t
"type": "text", "type": "text",
}, },
], ],
"customData": undefined,
"endArrowhead": "arrow", "endArrowhead": "arrow",
"endBinding": { "endBinding": {
"elementId": "text-2", "elementId": "text-2",
@@ -376,7 +368,6 @@ exports[`Test Transform > Test arrow bindings > should bind arrows to existing t
"baseline": 0, "baseline": 0,
"boundElements": null, "boundElements": null,
"containerId": "id48", "containerId": "id48",
"customData": undefined,
"fillStyle": "solid", "fillStyle": "solid",
"fontFamily": 1, "fontFamily": 1,
"fontSize": 20, "fontSize": 20,
@@ -419,7 +410,6 @@ exports[`Test Transform > Test arrow bindings > should bind arrows to shapes whe
"type": "text", "type": "text",
}, },
], ],
"customData": undefined,
"endArrowhead": "arrow", "endArrowhead": "arrow",
"endBinding": { "endBinding": {
"elementId": "id40", "elementId": "id40",
@@ -475,7 +465,6 @@ exports[`Test Transform > Test arrow bindings > should bind arrows to shapes whe
"baseline": 0, "baseline": 0,
"boundElements": null, "boundElements": null,
"containerId": "id37", "containerId": "id37",
"customData": undefined,
"fillStyle": "solid", "fillStyle": "solid",
"fontFamily": 1, "fontFamily": 1,
"fontSize": 20, "fontSize": 20,
@@ -518,7 +507,6 @@ exports[`Test Transform > Test arrow bindings > should bind arrows to shapes whe
"type": "arrow", "type": "arrow",
}, },
], ],
"customData": undefined,
"fillStyle": "solid", "fillStyle": "solid",
"frameId": null, "frameId": null,
"groupIds": [], "groupIds": [],
@@ -554,7 +542,6 @@ exports[`Test Transform > Test arrow bindings > should bind arrows to shapes whe
"type": "arrow", "type": "arrow",
}, },
], ],
"customData": undefined,
"fillStyle": "solid", "fillStyle": "solid",
"frameId": null, "frameId": null,
"groupIds": [], "groupIds": [],
@@ -590,7 +577,6 @@ exports[`Test Transform > Test arrow bindings > should bind arrows to text when
"type": "text", "type": "text",
}, },
], ],
"customData": undefined,
"endArrowhead": "arrow", "endArrowhead": "arrow",
"endBinding": { "endBinding": {
"elementId": "id44", "elementId": "id44",
@@ -646,7 +632,6 @@ exports[`Test Transform > Test arrow bindings > should bind arrows to text when
"baseline": 0, "baseline": 0,
"boundElements": null, "boundElements": null,
"containerId": "id41", "containerId": "id41",
"customData": undefined,
"fillStyle": "solid", "fillStyle": "solid",
"fontFamily": 1, "fontFamily": 1,
"fontSize": 20, "fontSize": 20,
@@ -691,7 +676,6 @@ exports[`Test Transform > Test arrow bindings > should bind arrows to text when
}, },
], ],
"containerId": null, "containerId": null,
"customData": undefined,
"fillStyle": "solid", "fillStyle": "solid",
"fontFamily": 1, "fontFamily": 1,
"fontSize": 20, "fontSize": 20,
@@ -736,7 +720,6 @@ exports[`Test Transform > Test arrow bindings > should bind arrows to text when
}, },
], ],
"containerId": null, "containerId": null,
"customData": undefined,
"fillStyle": "solid", "fillStyle": "solid",
"fontFamily": 1, "fontFamily": 1,
"fontSize": 20, "fontSize": 20,
@@ -774,7 +757,6 @@ exports[`Test Transform > should not allow duplicate ids 1`] = `
"angle": 0, "angle": 0,
"backgroundColor": "transparent", "backgroundColor": "transparent",
"boundElements": null, "boundElements": null,
"customData": undefined,
"fillStyle": "solid", "fillStyle": "solid",
"frameId": null, "frameId": null,
"groupIds": [], "groupIds": [],
@@ -805,7 +787,6 @@ exports[`Test Transform > should transform linear elements 1`] = `
"angle": 0, "angle": 0,
"backgroundColor": "transparent", "backgroundColor": "transparent",
"boundElements": null, "boundElements": null,
"customData": undefined,
"endArrowhead": "arrow", "endArrowhead": "arrow",
"endBinding": null, "endBinding": null,
"fillStyle": "solid", "fillStyle": "solid",
@@ -851,7 +832,6 @@ exports[`Test Transform > should transform linear elements 2`] = `
"angle": 0, "angle": 0,
"backgroundColor": "transparent", "backgroundColor": "transparent",
"boundElements": null, "boundElements": null,
"customData": undefined,
"endArrowhead": "triangle", "endArrowhead": "triangle",
"endBinding": null, "endBinding": null,
"fillStyle": "solid", "fillStyle": "solid",
@@ -897,7 +877,6 @@ exports[`Test Transform > should transform linear elements 3`] = `
"angle": 0, "angle": 0,
"backgroundColor": "transparent", "backgroundColor": "transparent",
"boundElements": null, "boundElements": null,
"customData": undefined,
"endArrowhead": null, "endArrowhead": null,
"endBinding": null, "endBinding": null,
"fillStyle": "solid", "fillStyle": "solid",
@@ -943,7 +922,6 @@ exports[`Test Transform > should transform linear elements 4`] = `
"angle": 0, "angle": 0,
"backgroundColor": "transparent", "backgroundColor": "transparent",
"boundElements": null, "boundElements": null,
"customData": undefined,
"endArrowhead": null, "endArrowhead": null,
"endBinding": null, "endBinding": null,
"fillStyle": "solid", "fillStyle": "solid",
@@ -989,7 +967,6 @@ exports[`Test Transform > should transform regular shapes 1`] = `
"angle": 0, "angle": 0,
"backgroundColor": "transparent", "backgroundColor": "transparent",
"boundElements": null, "boundElements": null,
"customData": undefined,
"fillStyle": "solid", "fillStyle": "solid",
"frameId": null, "frameId": null,
"groupIds": [], "groupIds": [],
@@ -1020,7 +997,6 @@ exports[`Test Transform > should transform regular shapes 2`] = `
"angle": 0, "angle": 0,
"backgroundColor": "transparent", "backgroundColor": "transparent",
"boundElements": null, "boundElements": null,
"customData": undefined,
"fillStyle": "solid", "fillStyle": "solid",
"frameId": null, "frameId": null,
"groupIds": [], "groupIds": [],
@@ -1051,7 +1027,6 @@ exports[`Test Transform > should transform regular shapes 3`] = `
"angle": 0, "angle": 0,
"backgroundColor": "transparent", "backgroundColor": "transparent",
"boundElements": null, "boundElements": null,
"customData": undefined,
"fillStyle": "solid", "fillStyle": "solid",
"frameId": null, "frameId": null,
"groupIds": [], "groupIds": [],
@@ -1082,7 +1057,6 @@ exports[`Test Transform > should transform regular shapes 4`] = `
"angle": 0, "angle": 0,
"backgroundColor": "#c0eb75", "backgroundColor": "#c0eb75",
"boundElements": null, "boundElements": null,
"customData": undefined,
"fillStyle": "solid", "fillStyle": "solid",
"frameId": null, "frameId": null,
"groupIds": [], "groupIds": [],
@@ -1113,7 +1087,6 @@ exports[`Test Transform > should transform regular shapes 5`] = `
"angle": 0, "angle": 0,
"backgroundColor": "#ffc9c9", "backgroundColor": "#ffc9c9",
"boundElements": null, "boundElements": null,
"customData": undefined,
"fillStyle": "solid", "fillStyle": "solid",
"frameId": null, "frameId": null,
"groupIds": [], "groupIds": [],
@@ -1144,7 +1117,6 @@ exports[`Test Transform > should transform regular shapes 6`] = `
"angle": 0, "angle": 0,
"backgroundColor": "#a5d8ff", "backgroundColor": "#a5d8ff",
"boundElements": null, "boundElements": null,
"customData": undefined,
"fillStyle": "cross-hatch", "fillStyle": "cross-hatch",
"frameId": null, "frameId": null,
"groupIds": [], "groupIds": [],
@@ -1177,7 +1149,6 @@ exports[`Test Transform > should transform text element 1`] = `
"baseline": 0, "baseline": 0,
"boundElements": null, "boundElements": null,
"containerId": null, "containerId": null,
"customData": undefined,
"fillStyle": "solid", "fillStyle": "solid",
"fontFamily": 1, "fontFamily": 1,
"fontSize": 20, "fontSize": 20,
@@ -1217,7 +1188,6 @@ exports[`Test Transform > should transform text element 2`] = `
"baseline": 0, "baseline": 0,
"boundElements": null, "boundElements": null,
"containerId": null, "containerId": null,
"customData": undefined,
"fillStyle": "solid", "fillStyle": "solid",
"fontFamily": 1, "fontFamily": 1,
"fontSize": 20, "fontSize": 20,
@@ -1260,7 +1230,6 @@ exports[`Test Transform > should transform to labelled arrows when label provide
"type": "text", "type": "text",
}, },
], ],
"customData": undefined,
"endArrowhead": "arrow", "endArrowhead": "arrow",
"endBinding": null, "endBinding": null,
"fillStyle": "solid", "fillStyle": "solid",
@@ -1311,7 +1280,6 @@ exports[`Test Transform > should transform to labelled arrows when label provide
"type": "text", "type": "text",
}, },
], ],
"customData": undefined,
"endArrowhead": "arrow", "endArrowhead": "arrow",
"endBinding": null, "endBinding": null,
"fillStyle": "solid", "fillStyle": "solid",
@@ -1362,7 +1330,6 @@ exports[`Test Transform > should transform to labelled arrows when label provide
"type": "text", "type": "text",
}, },
], ],
"customData": undefined,
"endArrowhead": "arrow", "endArrowhead": "arrow",
"endBinding": null, "endBinding": null,
"fillStyle": "solid", "fillStyle": "solid",
@@ -1413,7 +1380,6 @@ exports[`Test Transform > should transform to labelled arrows when label provide
"type": "text", "type": "text",
}, },
], ],
"customData": undefined,
"endArrowhead": "arrow", "endArrowhead": "arrow",
"endBinding": null, "endBinding": null,
"fillStyle": "solid", "fillStyle": "solid",
@@ -1461,7 +1427,6 @@ exports[`Test Transform > should transform to labelled arrows when label provide
"baseline": 0, "baseline": 0,
"boundElements": null, "boundElements": null,
"containerId": "id25", "containerId": "id25",
"customData": undefined,
"fillStyle": "solid", "fillStyle": "solid",
"fontFamily": 1, "fontFamily": 1,
"fontSize": 20, "fontSize": 20,
@@ -1501,7 +1466,6 @@ exports[`Test Transform > should transform to labelled arrows when label provide
"baseline": 0, "baseline": 0,
"boundElements": null, "boundElements": null,
"containerId": "id26", "containerId": "id26",
"customData": undefined,
"fillStyle": "solid", "fillStyle": "solid",
"fontFamily": 1, "fontFamily": 1,
"fontSize": 20, "fontSize": 20,
@@ -1541,7 +1505,6 @@ exports[`Test Transform > should transform to labelled arrows when label provide
"baseline": 0, "baseline": 0,
"boundElements": null, "boundElements": null,
"containerId": "id27", "containerId": "id27",
"customData": undefined,
"fillStyle": "solid", "fillStyle": "solid",
"fontFamily": 1, "fontFamily": 1,
"fontSize": 20, "fontSize": 20,
@@ -1582,7 +1545,6 @@ exports[`Test Transform > should transform to labelled arrows when label provide
"baseline": 0, "baseline": 0,
"boundElements": null, "boundElements": null,
"containerId": "id28", "containerId": "id28",
"customData": undefined,
"fillStyle": "solid", "fillStyle": "solid",
"fontFamily": 1, "fontFamily": 1,
"fontSize": 20, "fontSize": 20,
@@ -1626,7 +1588,6 @@ exports[`Test Transform > should transform to text containers when label provide
"type": "text", "type": "text",
}, },
], ],
"customData": undefined,
"fillStyle": "solid", "fillStyle": "solid",
"frameId": null, "frameId": null,
"groupIds": [], "groupIds": [],
@@ -1662,7 +1623,6 @@ exports[`Test Transform > should transform to text containers when label provide
"type": "text", "type": "text",
}, },
], ],
"customData": undefined,
"fillStyle": "solid", "fillStyle": "solid",
"frameId": null, "frameId": null,
"groupIds": [], "groupIds": [],
@@ -1698,7 +1658,6 @@ exports[`Test Transform > should transform to text containers when label provide
"type": "text", "type": "text",
}, },
], ],
"customData": undefined,
"fillStyle": "solid", "fillStyle": "solid",
"frameId": null, "frameId": null,
"groupIds": [], "groupIds": [],
@@ -1734,7 +1693,6 @@ exports[`Test Transform > should transform to text containers when label provide
"type": "text", "type": "text",
}, },
], ],
"customData": undefined,
"fillStyle": "solid", "fillStyle": "solid",
"frameId": null, "frameId": null,
"groupIds": [], "groupIds": [],
@@ -1770,7 +1728,6 @@ exports[`Test Transform > should transform to text containers when label provide
"type": "text", "type": "text",
}, },
], ],
"customData": undefined,
"fillStyle": "solid", "fillStyle": "solid",
"frameId": null, "frameId": null,
"groupIds": [], "groupIds": [],
@@ -1806,7 +1763,6 @@ exports[`Test Transform > should transform to text containers when label provide
"type": "text", "type": "text",
}, },
], ],
"customData": undefined,
"fillStyle": "solid", "fillStyle": "solid",
"frameId": null, "frameId": null,
"groupIds": [], "groupIds": [],
@@ -1839,7 +1795,6 @@ exports[`Test Transform > should transform to text containers when label provide
"baseline": 0, "baseline": 0,
"boundElements": null, "boundElements": null,
"containerId": "id13", "containerId": "id13",
"customData": undefined,
"fillStyle": "solid", "fillStyle": "solid",
"fontFamily": 1, "fontFamily": 1,
"fontSize": 20, "fontSize": 20,
@@ -1879,7 +1834,6 @@ exports[`Test Transform > should transform to text containers when label provide
"baseline": 0, "baseline": 0,
"boundElements": null, "boundElements": null,
"containerId": "id14", "containerId": "id14",
"customData": undefined,
"fillStyle": "solid", "fillStyle": "solid",
"fontFamily": 1, "fontFamily": 1,
"fontSize": 20, "fontSize": 20,
@@ -1920,7 +1874,6 @@ exports[`Test Transform > should transform to text containers when label provide
"baseline": 0, "baseline": 0,
"boundElements": null, "boundElements": null,
"containerId": "id15", "containerId": "id15",
"customData": undefined,
"fillStyle": "solid", "fillStyle": "solid",
"fontFamily": 1, "fontFamily": 1,
"fontSize": 20, "fontSize": 20,
@@ -1963,7 +1916,6 @@ exports[`Test Transform > should transform to text containers when label provide
"baseline": 0, "baseline": 0,
"boundElements": null, "boundElements": null,
"containerId": "id16", "containerId": "id16",
"customData": undefined,
"fillStyle": "solid", "fillStyle": "solid",
"fontFamily": 1, "fontFamily": 1,
"fontSize": 20, "fontSize": 20,
@@ -2004,7 +1956,6 @@ exports[`Test Transform > should transform to text containers when label provide
"baseline": 0, "baseline": 0,
"boundElements": null, "boundElements": null,
"containerId": "id17", "containerId": "id17",
"customData": undefined,
"fillStyle": "solid", "fillStyle": "solid",
"fontFamily": 1, "fontFamily": 1,
"fontSize": 20, "fontSize": 20,
@@ -2046,7 +1997,6 @@ exports[`Test Transform > should transform to text containers when label provide
"baseline": 0, "baseline": 0,
"boundElements": null, "boundElements": null,
"containerId": "id18", "containerId": "id18",
"customData": undefined,
"fillStyle": "solid", "fillStyle": "solid",
"fontFamily": 1, "fontFamily": 1,
"fontSize": 20, "fontSize": 20,

View File

@@ -822,22 +822,4 @@ describe("Test Transform", () => {
"Duplicate id found for rect-1", "Duplicate id found for rect-1",
); );
}); });
it("should contains customData if provided", () => {
const rawData = [
{
type: "rectangle",
x: 100,
y: 100,
customData: { createdBy: "user01" },
},
];
const convertedElements = convertToExcalidrawElements(
rawData as ExcalidrawElementSkeleton[],
opts,
);
expect(convertedElements[0].customData).toStrictEqual({
createdBy: "user01",
});
});
}); });

View File

@@ -1,15 +1,11 @@
import { sanitizeUrl } from "@braintree/sanitize-url"; import { sanitizeUrl } from "@braintree/sanitize-url";
export const sanitizeHTMLAttribute = (html: string) => {
return html.replace(/"/g, "&quot;");
};
export const normalizeLink = (link: string) => { export const normalizeLink = (link: string) => {
link = link.trim(); link = link.trim();
if (!link) { if (!link) {
return link; return link;
} }
return sanitizeUrl(sanitizeHTMLAttribute(link)); return sanitizeUrl(link);
}; };
export const isLocalLink = (link: string | null) => { export const isLocalLink = (link: string | null) => {

View File

@@ -13,7 +13,6 @@ import { Point } from "../types";
import { generateRoughOptions } from "../scene/Shape"; import { generateRoughOptions } from "../scene/Shape";
import { import {
isArrowElement, isArrowElement,
isBoundToContainer,
isFreeDrawElement, isFreeDrawElement,
isLinearElement, isLinearElement,
isTextElement, isTextElement,
@@ -23,7 +22,6 @@ import { getBoundTextElement, getContainerElement } from "./textElement";
import { LinearElementEditor } from "./linearElementEditor"; import { LinearElementEditor } from "./linearElementEditor";
import { Mutable } from "../utility-types"; import { Mutable } from "../utility-types";
import { ShapeCache } from "../scene/ShapeCache"; import { ShapeCache } from "../scene/ShapeCache";
import Scene from "../scene/Scene";
export type RectangleBox = { export type RectangleBox = {
x: number; x: number;
@@ -55,29 +53,16 @@ export class ElementBounds {
static getBounds(element: ExcalidrawElement) { static getBounds(element: ExcalidrawElement) {
const cachedBounds = ElementBounds.boundsCache.get(element); const cachedBounds = ElementBounds.boundsCache.get(element);
if ( if (cachedBounds?.version && cachedBounds.version === element.version) {
cachedBounds?.version &&
cachedBounds.version === element.version &&
// we don't invalidate cache when we update containers and not labels,
// which is causing problems down the line. Fix TBA.
!isBoundToContainer(element)
) {
return cachedBounds.bounds; return cachedBounds.bounds;
} }
const bounds = ElementBounds.calculateBounds(element); const bounds = ElementBounds.calculateBounds(element);
// hack to ensure that downstream checks could retrieve element Scene ElementBounds.boundsCache.set(element, {
// so as to have correctly calculated bounds version: element.version,
// FIXME remove when we get rid of all the id:Scene / element:Scene mapping bounds,
const shouldCache = Scene.getScene(element); });
if (shouldCache) {
ElementBounds.boundsCache.set(element, {
version: element.version,
bounds,
});
}
return bounds; return bounds;
} }

View File

@@ -13,13 +13,11 @@ import {
NonDeletedExcalidrawElement, NonDeletedExcalidrawElement,
Theme, Theme,
} from "./types"; } from "./types";
import { sanitizeHTMLAttribute } from "../data/url";
type EmbeddedLink = type EmbeddedLink =
| ({ | ({
aspectRatio: { w: number; h: number }; aspectRatio: { w: number; h: number };
warning?: string; warning?: string;
sandbox: { allowSameOrigin?: boolean };
} & ( } & (
| { type: "video" | "generic"; link: string } | { type: "video" | "generic"; link: string }
| { type: "document"; srcdoc: (theme: Theme) => string } | { type: "document"; srcdoc: (theme: Theme) => string }
@@ -32,21 +30,20 @@ const RE_YOUTUBE =
/^(?:http(?:s)?:\/\/)?(?:www\.)?youtu(?:be\.com|\.be)\/(embed\/|watch\?v=|shorts\/|playlist\?list=|embed\/videoseries\?list=)?([a-zA-Z0-9_-]+)(?:\?t=|&t=|\?start=|&start=)?([a-zA-Z0-9_-]+)?[^\s]*$/; /^(?:http(?:s)?:\/\/)?(?:www\.)?youtu(?:be\.com|\.be)\/(embed\/|watch\?v=|shorts\/|playlist\?list=|embed\/videoseries\?list=)?([a-zA-Z0-9_-]+)(?:\?t=|&t=|\?start=|&start=)?([a-zA-Z0-9_-]+)?[^\s]*$/;
const RE_VIMEO = const RE_VIMEO =
/^(?:http(?:s)?:\/\/)?(?:(?:w){3}\.)?(?:player\.)?vimeo\.com\/(?:video\/)?([^?\s]+)(?:\?.*)?$/; /^(?:http(?:s)?:\/\/)?(?:(?:w){3}.)?(?:player\.)?vimeo\.com\/(?:video\/)?([^?\s]+)(?:\?.*)?$/;
const RE_FIGMA = /^https:\/\/(?:www\.)?figma\.com/; const RE_FIGMA = /^https:\/\/(?:www\.)?figma\.com/;
const RE_GH_GIST = /^https:\/\/gist\.github\.com\/([\w_-]+)\/([\w_-]+)/; const RE_GH_GIST = /^https:\/\/gist\.github\.com/;
const RE_GH_GIST_EMBED = const RE_GH_GIST_EMBED =
/^<script[\s\S]*?\ssrc=["'](https:\/\/gist\.github\.com\/.*?)\.js["']/i; /^<script[\s\S]*?\ssrc=["'](https:\/\/gist.github.com\/.*?)\.js["']/i;
// not anchored to start to allow <blockquote> twitter embeds // not anchored to start to allow <blockquote> twitter embeds
const RE_TWITTER = const RE_TWITTER = /(?:http(?:s)?:\/\/)?(?:(?:w){3}.)?twitter.com/;
/(?:https?:\/\/)?(?:(?:w){3}\.)?(?:twitter|x)\.com\/[^/]+\/status\/(\d+)/;
const RE_TWITTER_EMBED = const RE_TWITTER_EMBED =
/^<blockquote[\s\S]*?\shref=["'](https?:\/\/(?:twitter|x)\.com\/[^"']*)/i; /^<blockquote[\s\S]*?\shref=["'](https:\/\/twitter.com\/[^"']*)/i;
const RE_VALTOWN = const RE_VALTOWN =
/^https:\/\/(?:www\.)?val\.town\/(v|embed)\/[a-zA-Z_$][0-9a-zA-Z_$]+\.[a-zA-Z_$][0-9a-zA-Z_$]+/; /^https:\/\/(?:www\.)?val.town\/(v|embed)\/[a-zA-Z_$][0-9a-zA-Z_$]+\.[a-zA-Z_$][0-9a-zA-Z_$]+/;
const RE_GENERIC_EMBED = const RE_GENERIC_EMBED =
/^<(?:iframe|blockquote)[\s\S]*?\s(?:src|href)=["']([^"']*)["'][\s\S]*?>$/i; /^<(?:iframe|blockquote)[\s\S]*?\s(?:src|href)=["']([^"']*)["'][\s\S]*?>$/i;
@@ -67,18 +64,7 @@ const ALLOWED_DOMAINS = new Set([
"stackblitz.com", "stackblitz.com",
"val.town", "val.town",
"giphy.com", "giphy.com",
]); "dddice.com",
const ALLOW_SAME_ORIGIN = new Set([
"youtube.com",
"youtu.be",
"vimeo.com",
"player.vimeo.com",
"figma.com",
"twitter.com",
"x.com",
"*.simplepdf.eu",
"stackblitz.com",
]); ]);
const createSrcDoc = (body: string) => { const createSrcDoc = (body: string) => {
@@ -96,10 +82,6 @@ export const getEmbedLink = (link: string | null | undefined): EmbeddedLink => {
const originalLink = link; const originalLink = link;
const allowSameOrigin = ALLOW_SAME_ORIGIN.has(
matchHostname(link, ALLOW_SAME_ORIGIN) || "",
);
let type: "video" | "generic" = "generic"; let type: "video" | "generic" = "generic";
let aspectRatio = { w: 560, h: 840 }; let aspectRatio = { w: 560, h: 840 };
const ytLink = link.match(RE_YOUTUBE); const ytLink = link.match(RE_YOUTUBE);
@@ -122,18 +104,8 @@ export const getEmbedLink = (link: string | null | undefined): EmbeddedLink => {
break; break;
} }
aspectRatio = isPortrait ? { w: 315, h: 560 } : { w: 560, h: 315 }; aspectRatio = isPortrait ? { w: 315, h: 560 } : { w: 560, h: 315 };
embeddedLinkCache.set(originalLink, { embeddedLinkCache.set(originalLink, { link, aspectRatio, type });
link, return { link, aspectRatio, type };
aspectRatio,
type,
sandbox: { allowSameOrigin },
});
return {
link,
aspectRatio,
type,
sandbox: { allowSameOrigin },
};
} }
const vimeoLink = link.match(RE_VIMEO); const vimeoLink = link.match(RE_VIMEO);
@@ -147,13 +119,8 @@ export const getEmbedLink = (link: string | null | undefined): EmbeddedLink => {
aspectRatio = { w: 560, h: 315 }; aspectRatio = { w: 560, h: 315 };
//warning deliberately ommited so it is displayed only once per link //warning deliberately ommited so it is displayed only once per link
//same link next time will be served from cache //same link next time will be served from cache
embeddedLinkCache.set(originalLink, { embeddedLinkCache.set(originalLink, { link, aspectRatio, type });
link, return { link, aspectRatio, type, warning };
aspectRatio,
type,
sandbox: { allowSameOrigin },
});
return { link, aspectRatio, type, warning, sandbox: { allowSameOrigin } };
} }
const figmaLink = link.match(RE_FIGMA); const figmaLink = link.match(RE_FIGMA);
@@ -163,81 +130,75 @@ export const getEmbedLink = (link: string | null | undefined): EmbeddedLink => {
link, link,
)}`; )}`;
aspectRatio = { w: 550, h: 550 }; aspectRatio = { w: 550, h: 550 };
embeddedLinkCache.set(originalLink, { embeddedLinkCache.set(originalLink, { link, aspectRatio, type });
link, return { link, aspectRatio, type };
aspectRatio,
type,
sandbox: { allowSameOrigin },
});
return { link, aspectRatio, type, sandbox: { allowSameOrigin } };
} }
const valLink = link.match(RE_VALTOWN); const valLink = link.match(RE_VALTOWN);
if (valLink) { if (valLink) {
link = link =
valLink[1] === "embed" ? valLink[0] : valLink[0].replace("/v", "/embed"); valLink[1] === "embed" ? valLink[0] : valLink[0].replace("/v", "/embed");
embeddedLinkCache.set(originalLink, { embeddedLinkCache.set(originalLink, { link, aspectRatio, type });
link, return { link, aspectRatio, type };
aspectRatio,
type,
sandbox: { allowSameOrigin },
});
return { link, aspectRatio, type, sandbox: { allowSameOrigin } };
} }
if (RE_TWITTER.test(link)) { if (RE_TWITTER.test(link)) {
const postId = link.match(RE_TWITTER)![1]; let ret: EmbeddedLink;
// the embed srcdoc still supports twitter.com domain only. // assume embed code
// Note that we don't attempt to parse the username as it can consist of if (/<blockquote/.test(link)) {
// non-latin1 characters, and the username in the url can be set to anything const srcDoc = createSrcDoc(link);
// without affecting the embed. ret = {
const safeURL = sanitizeHTMLAttribute( type: "document",
`https://twitter.com/x/status/${postId}`, srcdoc: () => srcDoc,
); aspectRatio: { w: 480, h: 480 },
};
const ret: EmbeddedLink = { // assume regular tweet url
type: "document", } else {
srcdoc: (theme: string) => ret = {
createSrcDoc( type: "document",
`<blockquote class="twitter-tweet" data-dnt="true" data-theme="${theme}"><a href="${safeURL}"></a></blockquote> <script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>`, srcdoc: (theme: string) =>
), createSrcDoc(
aspectRatio: { w: 480, h: 480 }, `<blockquote class="twitter-tweet" data-dnt="true" data-theme="${theme}"><a href="${link}"></a></blockquote> <script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>`,
sandbox: { allowSameOrigin }, ),
}; aspectRatio: { w: 480, h: 480 },
};
}
embeddedLinkCache.set(originalLink, ret); embeddedLinkCache.set(originalLink, ret);
return ret; return ret;
} }
if (RE_GH_GIST.test(link)) { if (RE_GH_GIST.test(link)) {
const [, user, gistId] = link.match(RE_GH_GIST)!; let ret: EmbeddedLink;
const safeURL = sanitizeHTMLAttribute( // assume embed code
`https://gist.github.com/${user}/${gistId}`, if (/<script>/.test(link)) {
); const srcDoc = createSrcDoc(link);
const ret: EmbeddedLink = { ret = {
type: "document", type: "document",
srcdoc: () => srcdoc: () => srcDoc,
createSrcDoc(` aspectRatio: { w: 550, h: 720 },
<script src="${safeURL}.js"></script> };
// assume regular url
} else {
ret = {
type: "document",
srcdoc: () =>
createSrcDoc(`
<script src="${link}.js"></script>
<style type="text/css"> <style type="text/css">
* { margin: 0px; } * { margin: 0px; }
table, .gist { height: 100%; } table, .gist { height: 100%; }
.gist .gist-file { height: calc(100vh - 2px); padding: 0px; display: grid; grid-template-rows: 1fr auto; } .gist .gist-file { height: calc(100vh - 2px); padding: 0px; display: grid; grid-template-rows: 1fr auto; }
</style> </style>
`), `),
aspectRatio: { w: 550, h: 720 }, aspectRatio: { w: 550, h: 720 },
sandbox: { allowSameOrigin }, };
}; }
embeddedLinkCache.set(link, ret); embeddedLinkCache.set(link, ret);
return ret; return ret;
} }
embeddedLinkCache.set(link, { embeddedLinkCache.set(link, { link, aspectRatio, type });
link, return { link, aspectRatio, type };
aspectRatio,
type,
sandbox: { allowSameOrigin },
});
return { link, aspectRatio, type, sandbox: { allowSameOrigin } };
}; };
export const isEmbeddableOrLabel = ( export const isEmbeddableOrLabel = (
@@ -312,39 +273,34 @@ export const actionSetEmbeddableAsActiveTool = register({
}, },
}); });
const matchHostname = ( const validateHostname = (
url: string, url: string,
/** using a Set assumes it already contains normalized bare domains */ /** using a Set assumes it already contains normalized bare domains */
allowedHostnames: Set<string> | string, allowedHostnames: Set<string> | string,
): string | null => { ): boolean => {
try { try {
const { hostname } = new URL(url); const { hostname } = new URL(url);
const bareDomain = hostname.replace(/^www\./, ""); const bareDomain = hostname.replace(/^www\./, "");
const bareDomainWithFirstSubdomainWildcarded = bareDomain.replace(
/^([^.]+)/,
"*",
);
if (allowedHostnames instanceof Set) { if (allowedHostnames instanceof Set) {
if (ALLOWED_DOMAINS.has(bareDomain)) { return (
return bareDomain; ALLOWED_DOMAINS.has(bareDomain) ||
} ALLOWED_DOMAINS.has(bareDomainWithFirstSubdomainWildcarded)
const bareDomainWithFirstSubdomainWildcarded = bareDomain.replace(
/^([^.]+)/,
"*",
); );
if (ALLOWED_DOMAINS.has(bareDomainWithFirstSubdomainWildcarded)) {
return bareDomainWithFirstSubdomainWildcarded;
}
return null;
} }
const bareAllowedHostname = allowedHostnames.replace(/^www\./, ""); if (bareDomain === allowedHostnames.replace(/^www\./, "")) {
if (bareDomain === bareAllowedHostname) { return true;
return bareAllowedHostname;
} }
} catch (error) { } catch (error) {
// ignore // ignore
} }
return null; return false;
}; };
export const extractSrc = (htmlString: string): string => { export const extractSrc = (htmlString: string): string => {
@@ -393,7 +349,7 @@ export const embeddableURLValidator = (
if (url.match(domain)) { if (url.match(domain)) {
return true; return true;
} }
} else if (matchHostname(url, domain)) { } else if (validateHostname(url, domain)) {
return true; return true;
} }
} }
@@ -401,5 +357,5 @@ export const embeddableURLValidator = (
} }
} }
return !!matchHostname(url, ALLOWED_DOMAINS); return validateHostname(url, ALLOWED_DOMAINS);
}; };

View File

@@ -67,7 +67,6 @@ export type ElementConstructorOpts = MarkOptional<
| "roundness" | "roundness"
| "locked" | "locked"
| "opacity" | "opacity"
| "customData"
>; >;
const _newElementBase = <T extends ExcalidrawElement>( const _newElementBase = <T extends ExcalidrawElement>(
@@ -121,7 +120,6 @@ const _newElementBase = <T extends ExcalidrawElement>(
updated: getUpdatedTimestamp(), updated: getUpdatedTimestamp(),
link, link,
locked, locked,
customData: rest.customData,
}; };
return element; return element;
}; };

View File

@@ -1,7 +1,7 @@
[ [
{ {
"path": "dist/excalidraw.production.min.js", "path": "dist/excalidraw.production.min.js",
"limit": "335 kB" "limit": "325 kB"
}, },
{ {
"path": "dist/excalidraw-assets/locales", "path": "dist/excalidraw-assets/locales",

View File

@@ -11,72 +11,6 @@ The change should be grouped under one of the below section and must contain PR
Please add the latest change on the top under the correct section. Please add the latest change on the top under the correct section.
--> -->
## Unreleased
### Features
- Add `onPointerUp` prop [#7638](https://github.com/excalidraw/excalidraw/pull/7638).
- Expose `getVisibleSceneBounds` helper to get scene bounds of visible canvas area. [#7450](https://github.com/excalidraw/excalidraw/pull/7450)
### Fixes
- Keep customData when converting to ExcalidrawElement. [#7656](https://github.com/excalidraw/excalidraw/pull/7656)
### Breaking Changes
- `ExcalidrawEmbeddableElement.validated` was removed and moved to private editor state. This should largely not affect your apps unless you were reading from this attribute. We keep validating embeddable urls internally, and the public [`props.validateEmbeddable`](https://docs.excalidraw.com/docs/@excalidraw/excalidraw/api/props#validateembeddable) still applies. [#7539](https://github.com/excalidraw/excalidraw/pull/7539)
- Create an `ESM` build for `@excalidraw/excalidraw`. The API is in progress and subject to change before stable release. There are some changes on how the package will be consumed
#### Bundler
- CSS needs to be imported so you will need to import the css along with the excalidraw component
```js
import { Excalidraw } from "@excalidraw/excalidraw";
import "@excalidraw/excalidraw/index.css";
```
- The `types` path is updated
Instead of importing from `@excalidraw/excalidraw/types/`, you will need to import from `@excalidraw/excalidraw/dist/excalidraw` or `@excalidraw/excalidraw/dist/utils` depending on the types you are using.
However this we will be fixing before stable release, so in case you want to try it out you will need to update the types for now.
#### Browser
- Since its `ESM` so now script type `module` can be used to load it and css needs to be loaded as well.
```html
<link
rel="stylesheet"
href="https://unpkg.com/@excalidraw/excalidraw@next/dist/browser/dev/index.css"
/>
<script type="module">
import * as ExcalidrawLib from "https://unpkg.com/@excalidraw/excalidraw@next/dist/browser/dev/index.js";
window.ExcalidrawLib = ExcalidrawLib;
</script>
```
- `appState.openDialog` type was changed from `null | string` to `null | { name: string }`. [#7336](https://github.com/excalidraw/excalidraw/pull/7336)
## 0.17.1 (2023-11-28)
### Fixes
- Umd build for browser since it was breaking in v0.17.0 [#7349](https://github.com/excalidraw/excalidraw/pull/7349). Also make sure that when using `Vite`, the `process.env.IS_PREACT` is set as `"true"` (string) and not a boolean.
```
define: {
"process.env.IS_PREACT": JSON.stringify("true"),
}
```
### Breaking Changes
- `appState.openDialog` type was changed from `null | string` to `null | { name: string }`. [#7336](https://github.com/excalidraw/excalidraw/pull/7336)
## 0.17.0 (2023-11-14) ## 0.17.0 (2023-11-14)
### Features ### Features

View File

@@ -1,6 +1,6 @@
{ {
"name": "@excalidraw/excalidraw", "name": "@excalidraw/excalidraw",
"version": "0.17.6", "version": "0.17.0",
"main": "main.js", "main": "main.js",
"types": "types/packages/excalidraw/index.d.ts", "types": "types/packages/excalidraw/index.d.ts",
"files": [ "files": [

View File

@@ -1,3 +1,5 @@
const { merge } = require("webpack-merge");
const prodConfig = require("./webpack.prod.config"); const prodConfig = require("./webpack.prod.config");
const devConfig = require("./webpack.dev.config"); const devConfig = require("./webpack.dev.config");
@@ -9,7 +11,6 @@ const outputFile = isProd
: "excalidraw-with-preact.development"; : "excalidraw-with-preact.development";
const preactWebpackConfig = { const preactWebpackConfig = {
...config,
entry: { entry: {
[outputFile]: "./entry.js", [outputFile]: "./entry.js",
}, },
@@ -29,4 +30,4 @@ const preactWebpackConfig = {
}, },
}, },
}; };
module.exports = preactWebpackConfig; module.exports = merge(config, preactWebpackConfig);

View File

@@ -385,7 +385,6 @@ exports[`contextMenu element > right-clicking on a group should select whole gro
"angle": 0, "angle": 0,
"backgroundColor": "red", "backgroundColor": "red",
"boundElements": null, "boundElements": null,
"customData": undefined,
"fillStyle": "solid", "fillStyle": "solid",
"frameId": null, "frameId": null,
"groupIds": [ "groupIds": [
@@ -420,7 +419,6 @@ exports[`contextMenu element > right-clicking on a group should select whole gro
"angle": 0, "angle": 0,
"backgroundColor": "red", "backgroundColor": "red",
"boundElements": null, "boundElements": null,
"customData": undefined,
"fillStyle": "solid", "fillStyle": "solid",
"frameId": null, "frameId": null,
"groupIds": [ "groupIds": [
@@ -582,7 +580,6 @@ exports[`contextMenu element > selecting 'Add to library' in context menu adds e
"angle": 0, "angle": 0,
"backgroundColor": "transparent", "backgroundColor": "transparent",
"boundElements": null, "boundElements": null,
"customData": undefined,
"fillStyle": "solid", "fillStyle": "solid",
"frameId": null, "frameId": null,
"groupIds": [], "groupIds": [],
@@ -642,7 +639,6 @@ exports[`contextMenu element > selecting 'Add to library' in context menu adds e
"angle": 0, "angle": 0,
"backgroundColor": "transparent", "backgroundColor": "transparent",
"boundElements": null, "boundElements": null,
"customData": undefined,
"fillStyle": "solid", "fillStyle": "solid",
"frameId": null, "frameId": null,
"groupIds": [], "groupIds": [],
@@ -784,7 +780,6 @@ exports[`contextMenu element > selecting 'Bring forward' in context menu brings
"angle": 0, "angle": 0,
"backgroundColor": "transparent", "backgroundColor": "transparent",
"boundElements": null, "boundElements": null,
"customData": undefined,
"fillStyle": "solid", "fillStyle": "solid",
"frameId": null, "frameId": null,
"groupIds": [], "groupIds": [],
@@ -817,7 +812,6 @@ exports[`contextMenu element > selecting 'Bring forward' in context menu brings
"angle": 0, "angle": 0,
"backgroundColor": "transparent", "backgroundColor": "transparent",
"boundElements": null, "boundElements": null,
"customData": undefined,
"fillStyle": "solid", "fillStyle": "solid",
"frameId": null, "frameId": null,
"groupIds": [], "groupIds": [],
@@ -877,7 +871,6 @@ exports[`contextMenu element > selecting 'Bring forward' in context menu brings
"angle": 0, "angle": 0,
"backgroundColor": "transparent", "backgroundColor": "transparent",
"boundElements": null, "boundElements": null,
"customData": undefined,
"fillStyle": "solid", "fillStyle": "solid",
"frameId": null, "frameId": null,
"groupIds": [], "groupIds": [],
@@ -921,7 +914,6 @@ exports[`contextMenu element > selecting 'Bring forward' in context menu brings
"angle": 0, "angle": 0,
"backgroundColor": "transparent", "backgroundColor": "transparent",
"boundElements": null, "boundElements": null,
"customData": undefined,
"fillStyle": "solid", "fillStyle": "solid",
"frameId": null, "frameId": null,
"groupIds": [], "groupIds": [],
@@ -951,7 +943,6 @@ exports[`contextMenu element > selecting 'Bring forward' in context menu brings
"angle": 0, "angle": 0,
"backgroundColor": "transparent", "backgroundColor": "transparent",
"boundElements": null, "boundElements": null,
"customData": undefined,
"fillStyle": "solid", "fillStyle": "solid",
"frameId": null, "frameId": null,
"groupIds": [], "groupIds": [],
@@ -995,7 +986,6 @@ exports[`contextMenu element > selecting 'Bring forward' in context menu brings
"angle": 0, "angle": 0,
"backgroundColor": "transparent", "backgroundColor": "transparent",
"boundElements": null, "boundElements": null,
"customData": undefined,
"fillStyle": "solid", "fillStyle": "solid",
"frameId": null, "frameId": null,
"groupIds": [], "groupIds": [],
@@ -1025,7 +1015,6 @@ exports[`contextMenu element > selecting 'Bring forward' in context menu brings
"angle": 0, "angle": 0,
"backgroundColor": "transparent", "backgroundColor": "transparent",
"boundElements": null, "boundElements": null,
"customData": undefined,
"fillStyle": "solid", "fillStyle": "solid",
"frameId": null, "frameId": null,
"groupIds": [], "groupIds": [],
@@ -1167,7 +1156,6 @@ exports[`contextMenu element > selecting 'Bring to front' in context menu brings
"angle": 0, "angle": 0,
"backgroundColor": "transparent", "backgroundColor": "transparent",
"boundElements": null, "boundElements": null,
"customData": undefined,
"fillStyle": "solid", "fillStyle": "solid",
"frameId": null, "frameId": null,
"groupIds": [], "groupIds": [],
@@ -1200,7 +1188,6 @@ exports[`contextMenu element > selecting 'Bring to front' in context menu brings
"angle": 0, "angle": 0,
"backgroundColor": "transparent", "backgroundColor": "transparent",
"boundElements": null, "boundElements": null,
"customData": undefined,
"fillStyle": "solid", "fillStyle": "solid",
"frameId": null, "frameId": null,
"groupIds": [], "groupIds": [],
@@ -1260,7 +1247,6 @@ exports[`contextMenu element > selecting 'Bring to front' in context menu brings
"angle": 0, "angle": 0,
"backgroundColor": "transparent", "backgroundColor": "transparent",
"boundElements": null, "boundElements": null,
"customData": undefined,
"fillStyle": "solid", "fillStyle": "solid",
"frameId": null, "frameId": null,
"groupIds": [], "groupIds": [],
@@ -1304,7 +1290,6 @@ exports[`contextMenu element > selecting 'Bring to front' in context menu brings
"angle": 0, "angle": 0,
"backgroundColor": "transparent", "backgroundColor": "transparent",
"boundElements": null, "boundElements": null,
"customData": undefined,
"fillStyle": "solid", "fillStyle": "solid",
"frameId": null, "frameId": null,
"groupIds": [], "groupIds": [],
@@ -1334,7 +1319,6 @@ exports[`contextMenu element > selecting 'Bring to front' in context menu brings
"angle": 0, "angle": 0,
"backgroundColor": "transparent", "backgroundColor": "transparent",
"boundElements": null, "boundElements": null,
"customData": undefined,
"fillStyle": "solid", "fillStyle": "solid",
"frameId": null, "frameId": null,
"groupIds": [], "groupIds": [],
@@ -1378,7 +1362,6 @@ exports[`contextMenu element > selecting 'Bring to front' in context menu brings
"angle": 0, "angle": 0,
"backgroundColor": "transparent", "backgroundColor": "transparent",
"boundElements": null, "boundElements": null,
"customData": undefined,
"fillStyle": "solid", "fillStyle": "solid",
"frameId": null, "frameId": null,
"groupIds": [], "groupIds": [],
@@ -1408,7 +1391,6 @@ exports[`contextMenu element > selecting 'Bring to front' in context menu brings
"angle": 0, "angle": 0,
"backgroundColor": "transparent", "backgroundColor": "transparent",
"boundElements": null, "boundElements": null,
"customData": undefined,
"fillStyle": "solid", "fillStyle": "solid",
"frameId": null, "frameId": null,
"groupIds": [], "groupIds": [],
@@ -1552,7 +1534,6 @@ exports[`contextMenu element > selecting 'Copy styles' in context menu copies st
"angle": 0, "angle": 0,
"backgroundColor": "transparent", "backgroundColor": "transparent",
"boundElements": null, "boundElements": null,
"customData": undefined,
"fillStyle": "solid", "fillStyle": "solid",
"frameId": null, "frameId": null,
"groupIds": [], "groupIds": [],
@@ -1612,7 +1593,6 @@ exports[`contextMenu element > selecting 'Copy styles' in context menu copies st
"angle": 0, "angle": 0,
"backgroundColor": "transparent", "backgroundColor": "transparent",
"boundElements": null, "boundElements": null,
"customData": undefined,
"fillStyle": "solid", "fillStyle": "solid",
"frameId": null, "frameId": null,
"groupIds": [], "groupIds": [],
@@ -1752,7 +1732,6 @@ exports[`contextMenu element > selecting 'Delete' in context menu deletes elemen
"angle": 0, "angle": 0,
"backgroundColor": "transparent", "backgroundColor": "transparent",
"boundElements": null, "boundElements": null,
"customData": undefined,
"fillStyle": "solid", "fillStyle": "solid",
"frameId": null, "frameId": null,
"groupIds": [], "groupIds": [],
@@ -1812,7 +1791,6 @@ exports[`contextMenu element > selecting 'Delete' in context menu deletes elemen
"angle": 0, "angle": 0,
"backgroundColor": "transparent", "backgroundColor": "transparent",
"boundElements": null, "boundElements": null,
"customData": undefined,
"fillStyle": "solid", "fillStyle": "solid",
"frameId": null, "frameId": null,
"groupIds": [], "groupIds": [],
@@ -1854,7 +1832,6 @@ exports[`contextMenu element > selecting 'Delete' in context menu deletes elemen
"angle": 0, "angle": 0,
"backgroundColor": "transparent", "backgroundColor": "transparent",
"boundElements": null, "boundElements": null,
"customData": undefined,
"fillStyle": "solid", "fillStyle": "solid",
"frameId": null, "frameId": null,
"groupIds": [], "groupIds": [],
@@ -1996,7 +1973,6 @@ exports[`contextMenu element > selecting 'Duplicate' in context menu duplicates
"angle": 0, "angle": 0,
"backgroundColor": "transparent", "backgroundColor": "transparent",
"boundElements": null, "boundElements": null,
"customData": undefined,
"fillStyle": "solid", "fillStyle": "solid",
"frameId": null, "frameId": null,
"groupIds": [], "groupIds": [],
@@ -2029,7 +2005,6 @@ exports[`contextMenu element > selecting 'Duplicate' in context menu duplicates
"angle": 0, "angle": 0,
"backgroundColor": "transparent", "backgroundColor": "transparent",
"boundElements": null, "boundElements": null,
"customData": undefined,
"fillStyle": "solid", "fillStyle": "solid",
"frameId": null, "frameId": null,
"groupIds": [], "groupIds": [],
@@ -2089,7 +2064,6 @@ exports[`contextMenu element > selecting 'Duplicate' in context menu duplicates
"angle": 0, "angle": 0,
"backgroundColor": "transparent", "backgroundColor": "transparent",
"boundElements": null, "boundElements": null,
"customData": undefined,
"fillStyle": "solid", "fillStyle": "solid",
"frameId": null, "frameId": null,
"groupIds": [], "groupIds": [],
@@ -2133,7 +2107,6 @@ exports[`contextMenu element > selecting 'Duplicate' in context menu duplicates
"angle": 0, "angle": 0,
"backgroundColor": "transparent", "backgroundColor": "transparent",
"boundElements": null, "boundElements": null,
"customData": undefined,
"fillStyle": "solid", "fillStyle": "solid",
"frameId": null, "frameId": null,
"groupIds": [], "groupIds": [],
@@ -2163,7 +2136,6 @@ exports[`contextMenu element > selecting 'Duplicate' in context menu duplicates
"angle": 0, "angle": 0,
"backgroundColor": "transparent", "backgroundColor": "transparent",
"boundElements": null, "boundElements": null,
"customData": undefined,
"fillStyle": "solid", "fillStyle": "solid",
"frameId": null, "frameId": null,
"groupIds": [], "groupIds": [],
@@ -2310,7 +2282,6 @@ exports[`contextMenu element > selecting 'Group selection' in context menu group
"angle": 0, "angle": 0,
"backgroundColor": "transparent", "backgroundColor": "transparent",
"boundElements": null, "boundElements": null,
"customData": undefined,
"fillStyle": "solid", "fillStyle": "solid",
"frameId": null, "frameId": null,
"groupIds": [ "groupIds": [
@@ -2345,7 +2316,6 @@ exports[`contextMenu element > selecting 'Group selection' in context menu group
"angle": 0, "angle": 0,
"backgroundColor": "transparent", "backgroundColor": "transparent",
"boundElements": null, "boundElements": null,
"customData": undefined,
"fillStyle": "solid", "fillStyle": "solid",
"frameId": null, "frameId": null,
"groupIds": [ "groupIds": [
@@ -2407,7 +2377,6 @@ exports[`contextMenu element > selecting 'Group selection' in context menu group
"angle": 0, "angle": 0,
"backgroundColor": "transparent", "backgroundColor": "transparent",
"boundElements": null, "boundElements": null,
"customData": undefined,
"fillStyle": "solid", "fillStyle": "solid",
"frameId": null, "frameId": null,
"groupIds": [], "groupIds": [],
@@ -2451,7 +2420,6 @@ exports[`contextMenu element > selecting 'Group selection' in context menu group
"angle": 0, "angle": 0,
"backgroundColor": "transparent", "backgroundColor": "transparent",
"boundElements": null, "boundElements": null,
"customData": undefined,
"fillStyle": "solid", "fillStyle": "solid",
"frameId": null, "frameId": null,
"groupIds": [], "groupIds": [],
@@ -2481,7 +2449,6 @@ exports[`contextMenu element > selecting 'Group selection' in context menu group
"angle": 0, "angle": 0,
"backgroundColor": "transparent", "backgroundColor": "transparent",
"boundElements": null, "boundElements": null,
"customData": undefined,
"fillStyle": "solid", "fillStyle": "solid",
"frameId": null, "frameId": null,
"groupIds": [], "groupIds": [],
@@ -2528,7 +2495,6 @@ exports[`contextMenu element > selecting 'Group selection' in context menu group
"angle": 0, "angle": 0,
"backgroundColor": "transparent", "backgroundColor": "transparent",
"boundElements": null, "boundElements": null,
"customData": undefined,
"fillStyle": "solid", "fillStyle": "solid",
"frameId": null, "frameId": null,
"groupIds": [ "groupIds": [
@@ -2560,7 +2526,6 @@ exports[`contextMenu element > selecting 'Group selection' in context menu group
"angle": 0, "angle": 0,
"backgroundColor": "transparent", "backgroundColor": "transparent",
"boundElements": null, "boundElements": null,
"customData": undefined,
"fillStyle": "solid", "fillStyle": "solid",
"frameId": null, "frameId": null,
"groupIds": [ "groupIds": [
@@ -2706,7 +2671,6 @@ exports[`contextMenu element > selecting 'Paste styles' in context menu pastes s
"angle": 0, "angle": 0,
"backgroundColor": "#a5d8ff", "backgroundColor": "#a5d8ff",
"boundElements": null, "boundElements": null,
"customData": undefined,
"fillStyle": "cross-hatch", "fillStyle": "cross-hatch",
"frameId": null, "frameId": null,
"groupIds": [], "groupIds": [],
@@ -2739,7 +2703,6 @@ exports[`contextMenu element > selecting 'Paste styles' in context menu pastes s
"angle": 0, "angle": 0,
"backgroundColor": "#a5d8ff", "backgroundColor": "#a5d8ff",
"boundElements": null, "boundElements": null,
"customData": undefined,
"fillStyle": "cross-hatch", "fillStyle": "cross-hatch",
"frameId": null, "frameId": null,
"groupIds": [], "groupIds": [],
@@ -2799,7 +2762,6 @@ exports[`contextMenu element > selecting 'Paste styles' in context menu pastes s
"angle": 0, "angle": 0,
"backgroundColor": "transparent", "backgroundColor": "transparent",
"boundElements": null, "boundElements": null,
"customData": undefined,
"fillStyle": "solid", "fillStyle": "solid",
"frameId": null, "frameId": null,
"groupIds": [], "groupIds": [],
@@ -2843,7 +2805,6 @@ exports[`contextMenu element > selecting 'Paste styles' in context menu pastes s
"angle": 0, "angle": 0,
"backgroundColor": "transparent", "backgroundColor": "transparent",
"boundElements": null, "boundElements": null,
"customData": undefined,
"fillStyle": "solid", "fillStyle": "solid",
"frameId": null, "frameId": null,
"groupIds": [], "groupIds": [],
@@ -2873,7 +2834,6 @@ exports[`contextMenu element > selecting 'Paste styles' in context menu pastes s
"angle": 0, "angle": 0,
"backgroundColor": "transparent", "backgroundColor": "transparent",
"boundElements": null, "boundElements": null,
"customData": undefined,
"fillStyle": "solid", "fillStyle": "solid",
"frameId": null, "frameId": null,
"groupIds": [], "groupIds": [],
@@ -2917,7 +2877,6 @@ exports[`contextMenu element > selecting 'Paste styles' in context menu pastes s
"angle": 0, "angle": 0,
"backgroundColor": "transparent", "backgroundColor": "transparent",
"boundElements": null, "boundElements": null,
"customData": undefined,
"fillStyle": "solid", "fillStyle": "solid",
"frameId": null, "frameId": null,
"groupIds": [], "groupIds": [],
@@ -2947,7 +2906,6 @@ exports[`contextMenu element > selecting 'Paste styles' in context menu pastes s
"angle": 0, "angle": 0,
"backgroundColor": "transparent", "backgroundColor": "transparent",
"boundElements": null, "boundElements": null,
"customData": undefined,
"fillStyle": "solid", "fillStyle": "solid",
"frameId": null, "frameId": null,
"groupIds": [], "groupIds": [],
@@ -2991,7 +2949,6 @@ exports[`contextMenu element > selecting 'Paste styles' in context menu pastes s
"angle": 0, "angle": 0,
"backgroundColor": "transparent", "backgroundColor": "transparent",
"boundElements": null, "boundElements": null,
"customData": undefined,
"fillStyle": "solid", "fillStyle": "solid",
"frameId": null, "frameId": null,
"groupIds": [], "groupIds": [],
@@ -3021,7 +2978,6 @@ exports[`contextMenu element > selecting 'Paste styles' in context menu pastes s
"angle": 0, "angle": 0,
"backgroundColor": "#a5d8ff", "backgroundColor": "#a5d8ff",
"boundElements": null, "boundElements": null,
"customData": undefined,
"fillStyle": "solid", "fillStyle": "solid",
"frameId": null, "frameId": null,
"groupIds": [], "groupIds": [],
@@ -3065,7 +3021,6 @@ exports[`contextMenu element > selecting 'Paste styles' in context menu pastes s
"angle": 0, "angle": 0,
"backgroundColor": "transparent", "backgroundColor": "transparent",
"boundElements": null, "boundElements": null,
"customData": undefined,
"fillStyle": "solid", "fillStyle": "solid",
"frameId": null, "frameId": null,
"groupIds": [], "groupIds": [],
@@ -3095,7 +3050,6 @@ exports[`contextMenu element > selecting 'Paste styles' in context menu pastes s
"angle": 0, "angle": 0,
"backgroundColor": "#a5d8ff", "backgroundColor": "#a5d8ff",
"boundElements": null, "boundElements": null,
"customData": undefined,
"fillStyle": "cross-hatch", "fillStyle": "cross-hatch",
"frameId": null, "frameId": null,
"groupIds": [], "groupIds": [],
@@ -3139,7 +3093,6 @@ exports[`contextMenu element > selecting 'Paste styles' in context menu pastes s
"angle": 0, "angle": 0,
"backgroundColor": "transparent", "backgroundColor": "transparent",
"boundElements": null, "boundElements": null,
"customData": undefined,
"fillStyle": "solid", "fillStyle": "solid",
"frameId": null, "frameId": null,
"groupIds": [], "groupIds": [],
@@ -3169,7 +3122,6 @@ exports[`contextMenu element > selecting 'Paste styles' in context menu pastes s
"angle": 0, "angle": 0,
"backgroundColor": "#a5d8ff", "backgroundColor": "#a5d8ff",
"boundElements": null, "boundElements": null,
"customData": undefined,
"fillStyle": "cross-hatch", "fillStyle": "cross-hatch",
"frameId": null, "frameId": null,
"groupIds": [], "groupIds": [],
@@ -3213,7 +3165,6 @@ exports[`contextMenu element > selecting 'Paste styles' in context menu pastes s
"angle": 0, "angle": 0,
"backgroundColor": "transparent", "backgroundColor": "transparent",
"boundElements": null, "boundElements": null,
"customData": undefined,
"fillStyle": "solid", "fillStyle": "solid",
"frameId": null, "frameId": null,
"groupIds": [], "groupIds": [],
@@ -3243,7 +3194,6 @@ exports[`contextMenu element > selecting 'Paste styles' in context menu pastes s
"angle": 0, "angle": 0,
"backgroundColor": "#a5d8ff", "backgroundColor": "#a5d8ff",
"boundElements": null, "boundElements": null,
"customData": undefined,
"fillStyle": "cross-hatch", "fillStyle": "cross-hatch",
"frameId": null, "frameId": null,
"groupIds": [], "groupIds": [],
@@ -3287,7 +3237,6 @@ exports[`contextMenu element > selecting 'Paste styles' in context menu pastes s
"angle": 0, "angle": 0,
"backgroundColor": "transparent", "backgroundColor": "transparent",
"boundElements": null, "boundElements": null,
"customData": undefined,
"fillStyle": "solid", "fillStyle": "solid",
"frameId": null, "frameId": null,
"groupIds": [], "groupIds": [],
@@ -3317,7 +3266,6 @@ exports[`contextMenu element > selecting 'Paste styles' in context menu pastes s
"angle": 0, "angle": 0,
"backgroundColor": "#a5d8ff", "backgroundColor": "#a5d8ff",
"boundElements": null, "boundElements": null,
"customData": undefined,
"fillStyle": "cross-hatch", "fillStyle": "cross-hatch",
"frameId": null, "frameId": null,
"groupIds": [], "groupIds": [],
@@ -3361,7 +3309,6 @@ exports[`contextMenu element > selecting 'Paste styles' in context menu pastes s
"angle": 0, "angle": 0,
"backgroundColor": "#a5d8ff", "backgroundColor": "#a5d8ff",
"boundElements": null, "boundElements": null,
"customData": undefined,
"fillStyle": "cross-hatch", "fillStyle": "cross-hatch",
"frameId": null, "frameId": null,
"groupIds": [], "groupIds": [],
@@ -3391,7 +3338,6 @@ exports[`contextMenu element > selecting 'Paste styles' in context menu pastes s
"angle": 0, "angle": 0,
"backgroundColor": "#a5d8ff", "backgroundColor": "#a5d8ff",
"boundElements": null, "boundElements": null,
"customData": undefined,
"fillStyle": "cross-hatch", "fillStyle": "cross-hatch",
"frameId": null, "frameId": null,
"groupIds": [], "groupIds": [],
@@ -3533,7 +3479,6 @@ exports[`contextMenu element > selecting 'Send backward' in context menu sends e
"angle": 0, "angle": 0,
"backgroundColor": "transparent", "backgroundColor": "transparent",
"boundElements": null, "boundElements": null,
"customData": undefined,
"fillStyle": "solid", "fillStyle": "solid",
"frameId": null, "frameId": null,
"groupIds": [], "groupIds": [],
@@ -3566,7 +3511,6 @@ exports[`contextMenu element > selecting 'Send backward' in context menu sends e
"angle": 0, "angle": 0,
"backgroundColor": "transparent", "backgroundColor": "transparent",
"boundElements": null, "boundElements": null,
"customData": undefined,
"fillStyle": "solid", "fillStyle": "solid",
"frameId": null, "frameId": null,
"groupIds": [], "groupIds": [],
@@ -3626,7 +3570,6 @@ exports[`contextMenu element > selecting 'Send backward' in context menu sends e
"angle": 0, "angle": 0,
"backgroundColor": "transparent", "backgroundColor": "transparent",
"boundElements": null, "boundElements": null,
"customData": undefined,
"fillStyle": "solid", "fillStyle": "solid",
"frameId": null, "frameId": null,
"groupIds": [], "groupIds": [],
@@ -3670,7 +3613,6 @@ exports[`contextMenu element > selecting 'Send backward' in context menu sends e
"angle": 0, "angle": 0,
"backgroundColor": "transparent", "backgroundColor": "transparent",
"boundElements": null, "boundElements": null,
"customData": undefined,
"fillStyle": "solid", "fillStyle": "solid",
"frameId": null, "frameId": null,
"groupIds": [], "groupIds": [],
@@ -3700,7 +3642,6 @@ exports[`contextMenu element > selecting 'Send backward' in context menu sends e
"angle": 0, "angle": 0,
"backgroundColor": "transparent", "backgroundColor": "transparent",
"boundElements": null, "boundElements": null,
"customData": undefined,
"fillStyle": "solid", "fillStyle": "solid",
"frameId": null, "frameId": null,
"groupIds": [], "groupIds": [],
@@ -3744,7 +3685,6 @@ exports[`contextMenu element > selecting 'Send backward' in context menu sends e
"angle": 0, "angle": 0,
"backgroundColor": "transparent", "backgroundColor": "transparent",
"boundElements": null, "boundElements": null,
"customData": undefined,
"fillStyle": "solid", "fillStyle": "solid",
"frameId": null, "frameId": null,
"groupIds": [], "groupIds": [],
@@ -3774,7 +3714,6 @@ exports[`contextMenu element > selecting 'Send backward' in context menu sends e
"angle": 0, "angle": 0,
"backgroundColor": "transparent", "backgroundColor": "transparent",
"boundElements": null, "boundElements": null,
"customData": undefined,
"fillStyle": "solid", "fillStyle": "solid",
"frameId": null, "frameId": null,
"groupIds": [], "groupIds": [],
@@ -3916,7 +3855,6 @@ exports[`contextMenu element > selecting 'Send to back' in context menu sends el
"angle": 0, "angle": 0,
"backgroundColor": "transparent", "backgroundColor": "transparent",
"boundElements": null, "boundElements": null,
"customData": undefined,
"fillStyle": "solid", "fillStyle": "solid",
"frameId": null, "frameId": null,
"groupIds": [], "groupIds": [],
@@ -3949,7 +3887,6 @@ exports[`contextMenu element > selecting 'Send to back' in context menu sends el
"angle": 0, "angle": 0,
"backgroundColor": "transparent", "backgroundColor": "transparent",
"boundElements": null, "boundElements": null,
"customData": undefined,
"fillStyle": "solid", "fillStyle": "solid",
"frameId": null, "frameId": null,
"groupIds": [], "groupIds": [],
@@ -4009,7 +3946,6 @@ exports[`contextMenu element > selecting 'Send to back' in context menu sends el
"angle": 0, "angle": 0,
"backgroundColor": "transparent", "backgroundColor": "transparent",
"boundElements": null, "boundElements": null,
"customData": undefined,
"fillStyle": "solid", "fillStyle": "solid",
"frameId": null, "frameId": null,
"groupIds": [], "groupIds": [],
@@ -4053,7 +3989,6 @@ exports[`contextMenu element > selecting 'Send to back' in context menu sends el
"angle": 0, "angle": 0,
"backgroundColor": "transparent", "backgroundColor": "transparent",
"boundElements": null, "boundElements": null,
"customData": undefined,
"fillStyle": "solid", "fillStyle": "solid",
"frameId": null, "frameId": null,
"groupIds": [], "groupIds": [],
@@ -4083,7 +4018,6 @@ exports[`contextMenu element > selecting 'Send to back' in context menu sends el
"angle": 0, "angle": 0,
"backgroundColor": "transparent", "backgroundColor": "transparent",
"boundElements": null, "boundElements": null,
"customData": undefined,
"fillStyle": "solid", "fillStyle": "solid",
"frameId": null, "frameId": null,
"groupIds": [], "groupIds": [],
@@ -4127,7 +4061,6 @@ exports[`contextMenu element > selecting 'Send to back' in context menu sends el
"angle": 0, "angle": 0,
"backgroundColor": "transparent", "backgroundColor": "transparent",
"boundElements": null, "boundElements": null,
"customData": undefined,
"fillStyle": "solid", "fillStyle": "solid",
"frameId": null, "frameId": null,
"groupIds": [], "groupIds": [],
@@ -4157,7 +4090,6 @@ exports[`contextMenu element > selecting 'Send to back' in context menu sends el
"angle": 0, "angle": 0,
"backgroundColor": "transparent", "backgroundColor": "transparent",
"boundElements": null, "boundElements": null,
"customData": undefined,
"fillStyle": "solid", "fillStyle": "solid",
"frameId": null, "frameId": null,
"groupIds": [], "groupIds": [],
@@ -4302,7 +4234,6 @@ exports[`contextMenu element > selecting 'Ungroup selection' in context menu ung
"angle": 0, "angle": 0,
"backgroundColor": "transparent", "backgroundColor": "transparent",
"boundElements": null, "boundElements": null,
"customData": undefined,
"fillStyle": "solid", "fillStyle": "solid",
"frameId": null, "frameId": null,
"groupIds": [], "groupIds": [],
@@ -4335,7 +4266,6 @@ exports[`contextMenu element > selecting 'Ungroup selection' in context menu ung
"angle": 0, "angle": 0,
"backgroundColor": "transparent", "backgroundColor": "transparent",
"boundElements": null, "boundElements": null,
"customData": undefined,
"fillStyle": "solid", "fillStyle": "solid",
"frameId": null, "frameId": null,
"groupIds": [], "groupIds": [],
@@ -4395,7 +4325,6 @@ exports[`contextMenu element > selecting 'Ungroup selection' in context menu ung
"angle": 0, "angle": 0,
"backgroundColor": "transparent", "backgroundColor": "transparent",
"boundElements": null, "boundElements": null,
"customData": undefined,
"fillStyle": "solid", "fillStyle": "solid",
"frameId": null, "frameId": null,
"groupIds": [], "groupIds": [],
@@ -4439,7 +4368,6 @@ exports[`contextMenu element > selecting 'Ungroup selection' in context menu ung
"angle": 0, "angle": 0,
"backgroundColor": "transparent", "backgroundColor": "transparent",
"boundElements": null, "boundElements": null,
"customData": undefined,
"fillStyle": "solid", "fillStyle": "solid",
"frameId": null, "frameId": null,
"groupIds": [], "groupIds": [],
@@ -4469,7 +4397,6 @@ exports[`contextMenu element > selecting 'Ungroup selection' in context menu ung
"angle": 0, "angle": 0,
"backgroundColor": "transparent", "backgroundColor": "transparent",
"boundElements": null, "boundElements": null,
"customData": undefined,
"fillStyle": "solid", "fillStyle": "solid",
"frameId": null, "frameId": null,
"groupIds": [], "groupIds": [],
@@ -4516,7 +4443,6 @@ exports[`contextMenu element > selecting 'Ungroup selection' in context menu ung
"angle": 0, "angle": 0,
"backgroundColor": "transparent", "backgroundColor": "transparent",
"boundElements": null, "boundElements": null,
"customData": undefined,
"fillStyle": "solid", "fillStyle": "solid",
"frameId": null, "frameId": null,
"groupIds": [ "groupIds": [
@@ -4548,7 +4474,6 @@ exports[`contextMenu element > selecting 'Ungroup selection' in context menu ung
"angle": 0, "angle": 0,
"backgroundColor": "transparent", "backgroundColor": "transparent",
"boundElements": null, "boundElements": null,
"customData": undefined,
"fillStyle": "solid", "fillStyle": "solid",
"frameId": null, "frameId": null,
"groupIds": [ "groupIds": [
@@ -4595,7 +4520,6 @@ exports[`contextMenu element > selecting 'Ungroup selection' in context menu ung
"angle": 0, "angle": 0,
"backgroundColor": "transparent", "backgroundColor": "transparent",
"boundElements": null, "boundElements": null,
"customData": undefined,
"fillStyle": "solid", "fillStyle": "solid",
"frameId": null, "frameId": null,
"groupIds": [], "groupIds": [],
@@ -4625,7 +4549,6 @@ exports[`contextMenu element > selecting 'Ungroup selection' in context menu ung
"angle": 0, "angle": 0,
"backgroundColor": "transparent", "backgroundColor": "transparent",
"boundElements": null, "boundElements": null,
"customData": undefined,
"fillStyle": "solid", "fillStyle": "solid",
"frameId": null, "frameId": null,
"groupIds": [], "groupIds": [],
@@ -5043,7 +4966,6 @@ exports[`contextMenu element > shows 'Group selection' in context menu for multi
"angle": 0, "angle": 0,
"backgroundColor": "transparent", "backgroundColor": "transparent",
"boundElements": null, "boundElements": null,
"customData": undefined,
"fillStyle": "solid", "fillStyle": "solid",
"frameId": null, "frameId": null,
"groupIds": [], "groupIds": [],
@@ -5076,7 +4998,6 @@ exports[`contextMenu element > shows 'Group selection' in context menu for multi
"angle": 0, "angle": 0,
"backgroundColor": "transparent", "backgroundColor": "transparent",
"boundElements": null, "boundElements": null,
"customData": undefined,
"fillStyle": "solid", "fillStyle": "solid",
"frameId": null, "frameId": null,
"groupIds": [], "groupIds": [],
@@ -5136,7 +5057,6 @@ exports[`contextMenu element > shows 'Group selection' in context menu for multi
"angle": 0, "angle": 0,
"backgroundColor": "transparent", "backgroundColor": "transparent",
"boundElements": null, "boundElements": null,
"customData": undefined,
"fillStyle": "solid", "fillStyle": "solid",
"frameId": null, "frameId": null,
"groupIds": [], "groupIds": [],
@@ -5180,7 +5100,6 @@ exports[`contextMenu element > shows 'Group selection' in context menu for multi
"angle": 0, "angle": 0,
"backgroundColor": "transparent", "backgroundColor": "transparent",
"boundElements": null, "boundElements": null,
"customData": undefined,
"fillStyle": "solid", "fillStyle": "solid",
"frameId": null, "frameId": null,
"groupIds": [], "groupIds": [],
@@ -5210,7 +5129,6 @@ exports[`contextMenu element > shows 'Group selection' in context menu for multi
"angle": 0, "angle": 0,
"backgroundColor": "transparent", "backgroundColor": "transparent",
"boundElements": null, "boundElements": null,
"customData": undefined,
"fillStyle": "solid", "fillStyle": "solid",
"frameId": null, "frameId": null,
"groupIds": [], "groupIds": [],
@@ -5630,7 +5548,6 @@ exports[`contextMenu element > shows 'Ungroup selection' in context menu for gro
"angle": 0, "angle": 0,
"backgroundColor": "transparent", "backgroundColor": "transparent",
"boundElements": null, "boundElements": null,
"customData": undefined,
"fillStyle": "solid", "fillStyle": "solid",
"frameId": null, "frameId": null,
"groupIds": [ "groupIds": [
@@ -5665,7 +5582,6 @@ exports[`contextMenu element > shows 'Ungroup selection' in context menu for gro
"angle": 0, "angle": 0,
"backgroundColor": "transparent", "backgroundColor": "transparent",
"boundElements": null, "boundElements": null,
"customData": undefined,
"fillStyle": "solid", "fillStyle": "solid",
"frameId": null, "frameId": null,
"groupIds": [ "groupIds": [
@@ -5727,7 +5643,6 @@ exports[`contextMenu element > shows 'Ungroup selection' in context menu for gro
"angle": 0, "angle": 0,
"backgroundColor": "transparent", "backgroundColor": "transparent",
"boundElements": null, "boundElements": null,
"customData": undefined,
"fillStyle": "solid", "fillStyle": "solid",
"frameId": null, "frameId": null,
"groupIds": [], "groupIds": [],
@@ -5771,7 +5686,6 @@ exports[`contextMenu element > shows 'Ungroup selection' in context menu for gro
"angle": 0, "angle": 0,
"backgroundColor": "transparent", "backgroundColor": "transparent",
"boundElements": null, "boundElements": null,
"customData": undefined,
"fillStyle": "solid", "fillStyle": "solid",
"frameId": null, "frameId": null,
"groupIds": [], "groupIds": [],
@@ -5801,7 +5715,6 @@ exports[`contextMenu element > shows 'Ungroup selection' in context menu for gro
"angle": 0, "angle": 0,
"backgroundColor": "transparent", "backgroundColor": "transparent",
"boundElements": null, "boundElements": null,
"customData": undefined,
"fillStyle": "solid", "fillStyle": "solid",
"frameId": null, "frameId": null,
"groupIds": [], "groupIds": [],
@@ -5848,7 +5761,6 @@ exports[`contextMenu element > shows 'Ungroup selection' in context menu for gro
"angle": 0, "angle": 0,
"backgroundColor": "transparent", "backgroundColor": "transparent",
"boundElements": null, "boundElements": null,
"customData": undefined,
"fillStyle": "solid", "fillStyle": "solid",
"frameId": null, "frameId": null,
"groupIds": [ "groupIds": [
@@ -5880,7 +5792,6 @@ exports[`contextMenu element > shows 'Ungroup selection' in context menu for gro
"angle": 0, "angle": 0,
"backgroundColor": "transparent", "backgroundColor": "transparent",
"boundElements": null, "boundElements": null,
"customData": undefined,
"fillStyle": "solid", "fillStyle": "solid",
"frameId": null, "frameId": null,
"groupIds": [ "groupIds": [
@@ -6927,7 +6838,6 @@ exports[`contextMenu element > shows context menu for element > [end of test] el
"angle": 0, "angle": 0,
"backgroundColor": "transparent", "backgroundColor": "transparent",
"boundElements": null, "boundElements": null,
"customData": undefined,
"fillStyle": "solid", "fillStyle": "solid",
"frameId": null, "frameId": null,
"groupIds": [], "groupIds": [],
@@ -6960,7 +6870,6 @@ exports[`contextMenu element > shows context menu for element > [end of test] el
"angle": 0, "angle": 0,
"backgroundColor": "red", "backgroundColor": "red",
"boundElements": null, "boundElements": null,
"customData": undefined,
"fillStyle": "solid", "fillStyle": "solid",
"frameId": null, "frameId": null,
"groupIds": [], "groupIds": [],
@@ -6993,7 +6902,6 @@ exports[`contextMenu element > shows context menu for element > [end of test] el
"angle": 0, "angle": 0,
"backgroundColor": "red", "backgroundColor": "red",
"boundElements": null, "boundElements": null,
"customData": undefined,
"fillStyle": "solid", "fillStyle": "solid",
"frameId": null, "frameId": null,
"groupIds": [], "groupIds": [],
@@ -7053,7 +6961,6 @@ exports[`contextMenu element > shows context menu for element > [end of test] hi
"angle": 0, "angle": 0,
"backgroundColor": "transparent", "backgroundColor": "transparent",
"boundElements": null, "boundElements": null,
"customData": undefined,
"fillStyle": "solid", "fillStyle": "solid",
"frameId": null, "frameId": null,
"groupIds": [], "groupIds": [],

View File

@@ -7,7 +7,6 @@ exports[`Test dragCreate > add element to the scene when pointer dragging long e
"angle": 0, "angle": 0,
"backgroundColor": "transparent", "backgroundColor": "transparent",
"boundElements": null, "boundElements": null,
"customData": undefined,
"endArrowhead": "arrow", "endArrowhead": "arrow",
"endBinding": null, "endBinding": null,
"fillStyle": "solid", "fillStyle": "solid",
@@ -57,7 +56,6 @@ exports[`Test dragCreate > add element to the scene when pointer dragging long e
"angle": 0, "angle": 0,
"backgroundColor": "transparent", "backgroundColor": "transparent",
"boundElements": null, "boundElements": null,
"customData": undefined,
"fillStyle": "solid", "fillStyle": "solid",
"frameId": null, "frameId": null,
"groupIds": [], "groupIds": [],
@@ -92,7 +90,6 @@ exports[`Test dragCreate > add element to the scene when pointer dragging long e
"angle": 0, "angle": 0,
"backgroundColor": "transparent", "backgroundColor": "transparent",
"boundElements": null, "boundElements": null,
"customData": undefined,
"fillStyle": "solid", "fillStyle": "solid",
"frameId": null, "frameId": null,
"groupIds": [], "groupIds": [],
@@ -125,7 +122,6 @@ exports[`Test dragCreate > add element to the scene when pointer dragging long e
"angle": 0, "angle": 0,
"backgroundColor": "transparent", "backgroundColor": "transparent",
"boundElements": null, "boundElements": null,
"customData": undefined,
"endArrowhead": null, "endArrowhead": null,
"endBinding": null, "endBinding": null,
"fillStyle": "solid", "fillStyle": "solid",
@@ -175,7 +171,6 @@ exports[`Test dragCreate > add element to the scene when pointer dragging long e
"angle": 0, "angle": 0,
"backgroundColor": "transparent", "backgroundColor": "transparent",
"boundElements": null, "boundElements": null,
"customData": undefined,
"fillStyle": "solid", "fillStyle": "solid",
"frameId": null, "frameId": null,
"groupIds": [], "groupIds": [],

View File

@@ -5,7 +5,6 @@ exports[`duplicate element on move when ALT is clicked > rectangle 1`] = `
"angle": 0, "angle": 0,
"backgroundColor": "transparent", "backgroundColor": "transparent",
"boundElements": null, "boundElements": null,
"customData": undefined,
"fillStyle": "solid", "fillStyle": "solid",
"frameId": null, "frameId": null,
"groupIds": [], "groupIds": [],
@@ -38,7 +37,6 @@ exports[`duplicate element on move when ALT is clicked > rectangle 2`] = `
"angle": 0, "angle": 0,
"backgroundColor": "transparent", "backgroundColor": "transparent",
"boundElements": null, "boundElements": null,
"customData": undefined,
"fillStyle": "solid", "fillStyle": "solid",
"frameId": null, "frameId": null,
"groupIds": [], "groupIds": [],
@@ -71,7 +69,6 @@ exports[`move element > rectangle 1`] = `
"angle": 0, "angle": 0,
"backgroundColor": "transparent", "backgroundColor": "transparent",
"boundElements": null, "boundElements": null,
"customData": undefined,
"fillStyle": "solid", "fillStyle": "solid",
"frameId": null, "frameId": null,
"groupIds": [], "groupIds": [],
@@ -109,7 +106,6 @@ exports[`move element > rectangles with binding arrow 1`] = `
"type": "arrow", "type": "arrow",
}, },
], ],
"customData": undefined,
"fillStyle": "solid", "fillStyle": "solid",
"frameId": null, "frameId": null,
"groupIds": [], "groupIds": [],
@@ -147,7 +143,6 @@ exports[`move element > rectangles with binding arrow 2`] = `
"type": "arrow", "type": "arrow",
}, },
], ],
"customData": undefined,
"fillStyle": "solid", "fillStyle": "solid",
"frameId": null, "frameId": null,
"groupIds": [], "groupIds": [],
@@ -180,7 +175,6 @@ exports[`move element > rectangles with binding arrow 3`] = `
"angle": 0, "angle": 0,
"backgroundColor": "transparent", "backgroundColor": "transparent",
"boundElements": null, "boundElements": null,
"customData": undefined,
"endArrowhead": null, "endArrowhead": null,
"endBinding": { "endBinding": {
"elementId": "id1", "elementId": "id1",

View File

@@ -5,7 +5,6 @@ exports[`multi point mode in linear elements > arrow 1`] = `
"angle": 0, "angle": 0,
"backgroundColor": "transparent", "backgroundColor": "transparent",
"boundElements": null, "boundElements": null,
"customData": undefined,
"endArrowhead": "arrow", "endArrowhead": "arrow",
"endBinding": null, "endBinding": null,
"fillStyle": "solid", "fillStyle": "solid",
@@ -60,7 +59,6 @@ exports[`multi point mode in linear elements > line 1`] = `
"angle": 0, "angle": 0,
"backgroundColor": "transparent", "backgroundColor": "transparent",
"boundElements": null, "boundElements": null,
"customData": undefined,
"endArrowhead": null, "endArrowhead": null,
"endBinding": null, "endBinding": null,
"fillStyle": "solid", "fillStyle": "solid",

File diff suppressed because it is too large Load Diff

View File

@@ -5,7 +5,6 @@ exports[`select single element on the scene > arrow 1`] = `
"angle": 0, "angle": 0,
"backgroundColor": "transparent", "backgroundColor": "transparent",
"boundElements": null, "boundElements": null,
"customData": undefined,
"endArrowhead": "arrow", "endArrowhead": "arrow",
"endBinding": null, "endBinding": null,
"fillStyle": "solid", "fillStyle": "solid",
@@ -53,7 +52,6 @@ exports[`select single element on the scene > arrow escape 1`] = `
"angle": 0, "angle": 0,
"backgroundColor": "transparent", "backgroundColor": "transparent",
"boundElements": null, "boundElements": null,
"customData": undefined,
"endArrowhead": null, "endArrowhead": null,
"endBinding": null, "endBinding": null,
"fillStyle": "solid", "fillStyle": "solid",
@@ -101,7 +99,6 @@ exports[`select single element on the scene > diamond 1`] = `
"angle": 0, "angle": 0,
"backgroundColor": "transparent", "backgroundColor": "transparent",
"boundElements": null, "boundElements": null,
"customData": undefined,
"fillStyle": "solid", "fillStyle": "solid",
"frameId": null, "frameId": null,
"groupIds": [], "groupIds": [],
@@ -134,7 +131,6 @@ exports[`select single element on the scene > ellipse 1`] = `
"angle": 0, "angle": 0,
"backgroundColor": "transparent", "backgroundColor": "transparent",
"boundElements": null, "boundElements": null,
"customData": undefined,
"fillStyle": "solid", "fillStyle": "solid",
"frameId": null, "frameId": null,
"groupIds": [], "groupIds": [],
@@ -167,7 +163,6 @@ exports[`select single element on the scene > rectangle 1`] = `
"angle": 0, "angle": 0,
"backgroundColor": "transparent", "backgroundColor": "transparent",
"boundElements": null, "boundElements": null,
"customData": undefined,
"fillStyle": "solid", "fillStyle": "solid",
"frameId": null, "frameId": null,
"groupIds": [], "groupIds": [],

View File

@@ -5,7 +5,6 @@ exports[`restoreElements > should restore arrow element correctly 1`] = `
"angle": 0, "angle": 0,
"backgroundColor": "transparent", "backgroundColor": "transparent",
"boundElements": [], "boundElements": [],
"customData": undefined,
"endArrowhead": null, "endArrowhead": null,
"endBinding": null, "endBinding": null,
"fillStyle": "solid", "fillStyle": "solid",
@@ -53,7 +52,6 @@ exports[`restoreElements > should restore correctly with rectangle, ellipse and
"angle": 0, "angle": 0,
"backgroundColor": "blue", "backgroundColor": "blue",
"boundElements": [], "boundElements": [],
"customData": undefined,
"fillStyle": "cross-hatch", "fillStyle": "cross-hatch",
"frameId": null, "frameId": null,
"groupIds": [ "groupIds": [
@@ -90,7 +88,6 @@ exports[`restoreElements > should restore correctly with rectangle, ellipse and
"angle": 0, "angle": 0,
"backgroundColor": "blue", "backgroundColor": "blue",
"boundElements": [], "boundElements": [],
"customData": undefined,
"fillStyle": "cross-hatch", "fillStyle": "cross-hatch",
"frameId": null, "frameId": null,
"groupIds": [ "groupIds": [
@@ -127,7 +124,6 @@ exports[`restoreElements > should restore correctly with rectangle, ellipse and
"angle": 0, "angle": 0,
"backgroundColor": "blue", "backgroundColor": "blue",
"boundElements": [], "boundElements": [],
"customData": undefined,
"fillStyle": "cross-hatch", "fillStyle": "cross-hatch",
"frameId": null, "frameId": null,
"groupIds": [ "groupIds": [
@@ -164,7 +160,6 @@ exports[`restoreElements > should restore freedraw element correctly 1`] = `
"angle": 0, "angle": 0,
"backgroundColor": "transparent", "backgroundColor": "transparent",
"boundElements": [], "boundElements": [],
"customData": undefined,
"fillStyle": "solid", "fillStyle": "solid",
"frameId": null, "frameId": null,
"groupIds": [], "groupIds": [],
@@ -201,7 +196,6 @@ exports[`restoreElements > should restore line and draw elements correctly 1`] =
"angle": 0, "angle": 0,
"backgroundColor": "transparent", "backgroundColor": "transparent",
"boundElements": [], "boundElements": [],
"customData": undefined,
"endArrowhead": null, "endArrowhead": null,
"endBinding": null, "endBinding": null,
"fillStyle": "solid", "fillStyle": "solid",
@@ -249,7 +243,6 @@ exports[`restoreElements > should restore line and draw elements correctly 2`] =
"angle": 0, "angle": 0,
"backgroundColor": "transparent", "backgroundColor": "transparent",
"boundElements": [], "boundElements": [],
"customData": undefined,
"endArrowhead": null, "endArrowhead": null,
"endBinding": null, "endBinding": null,
"fillStyle": "solid", "fillStyle": "solid",
@@ -299,7 +292,6 @@ exports[`restoreElements > should restore text element correctly passing value f
"baseline": 0, "baseline": 0,
"boundElements": [], "boundElements": [],
"containerId": null, "containerId": null,
"customData": undefined,
"fillStyle": "solid", "fillStyle": "solid",
"fontFamily": 1, "fontFamily": 1,
"fontSize": 14, "fontSize": 14,
@@ -341,7 +333,6 @@ exports[`restoreElements > should restore text element correctly with unknown fo
"baseline": 0, "baseline": 0,
"boundElements": [], "boundElements": [],
"containerId": null, "containerId": null,
"customData": undefined,
"fillStyle": "solid", "fillStyle": "solid",
"fontFamily": 1, "fontFamily": 1,
"fontSize": 10, "fontSize": 10,