excalidraw/src/tests/data/__snapshots__/restore.test.ts.snap

360 lines
6.7 KiB
Plaintext
Raw Normal View History

// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`restoreElements should restore arrow element correctly 1`] = `
Object {
"angle": 0,
"backgroundColor": "transparent",
"boundElements": Array [],
"endArrowhead": null,
"endBinding": null,
"fillStyle": "hachure",
"groupIds": Array [],
"height": 100,
"id": "id-arrow01",
"isDeleted": false,
"lastCommittedPoint": null,
feat: Support hyperlinks 🔥 (#4620) * feat: Support hypelinks * dont show edit when link not present * auto submit on blur * Add link button in sidebar and do it react way * add key to hyperlink to remount when element selection changes * autofocus input * remove click handler and use pointerup/down to show /hide popup * add keydown and support enter/escape to submit * show extrrnal link icon when element has link * use icons and open link in new tab * dnt submit unless link updated * renamed ffiles * remove unnecessary changes * update snap * hide link popup once user starts interacting with element and show again only if clicked outside and clicked on element again * render link icon outside the element * fix hit testing * rewrite implementation to render hyperlinks outside elements and hide when element selected * remove * remove * tweak icon position and size * rotate link icon when element rotated, handle zooming and render exactly where ne resize handle is rendered * no need to create a new reference anymore for element when link added/updated * rotate the link image as well when rotating element * calculate hitbox of link icon and show pointer when hovering over link icon * open link when clicked on link icon * show tooltip when hovering over link icon * show link action only when single element selected * support other protocols * add shortcut cmd/ctrl+k to edit/update link * don't hide popup after submit * renderes decreased woo * Add context mneu label to add/edit link * fix tests * remove tick and show trash when in edit mode * show edit view when element contains link * fix snap * horizontally center the hyperlink container with respect to elemnt * fix padding * remove checkcircle * show popup on hover of selected element and dismiss when outside hitbox * check if element has link before setting popup state * move logic of auto hide to hyperlink and dnt hide when editing * hide popover when drag/resize/rotate * unmount during autohide * autohide after 500ms * fix regression * prevent cmd/ctrl+k when inside link editor * submit when input not updated * allow custom urls * fix centering of popup when zoomed * fix hitbox during zoom * fix * tweak link normalization * touch hyperlink tooltip DOM only if needed * consider 0 if no offsetY * reduce hitbox of link icon and make sure link icon doesn't show on top of higher z-index elements * show link tooltip only if element has higher z-index * dnt show hyperlink popup when selection changes from element with link to element with no link and also hide popover when element type changes from selection to something else * lint: EOL * fix link icon tooltip positioning * open the link only when last pointer down and last pointer up hit the link hitbox * render tooltip after 300ms delay * ensure link popup and editor input have same height * wip: cache the link icon canvas * fix the image quality after caching using device pixel ratio yay * some cleanup * remove unused selectedElementIds from renderConfig * Update src/renderer/renderElement.ts * fix `opener` vulnerability * tweak styling * decrease padding * open local links in the same tab * fix caching * code style refactor * remove unnecessary save & restore * show link shortcut in help dialog * submit on cmd/ctrl+k * merge state props * Add title for link * update editview if prop changes * tweak link action logic * make `Hyperlink` compo editor state fully controlled * dont show popup when context menu open * show in contextMenu only for single selection & change pos * set button `selected` state * set contextMenuOpen on pointerdown * set contextMenyOpen to false when action triggered * don't render link icons on export * fix tests * fix buttons wrap * move focus states to input top-level rule * fix elements sharing `Hyperlink` state * fix hitbox for link icon in case of rect * Early return if hitting link icon Co-authored-by: dwelle <luzar.david@gmail.com>
2022-02-03 15:04:59 +00:00
"link": null,
"locked": false,
"opacity": 100,
"points": Array [
Array [
0,
0,
],
Array [
100,
100,
],
],
"roughness": 1,
"roundness": Object {
"type": 2,
},
"seed": Any<Number>,
"startArrowhead": null,
"startBinding": null,
"strokeColor": "#1e1e1e",
"strokeStyle": "solid",
"strokeWidth": 1,
"type": "arrow",
2021-11-24 17:38:33 +00:00
"updated": 1,
"version": 1,
"versionNonce": 0,
"width": 100,
"x": 0,
"y": 0,
}
`;
exports[`restoreElements should restore correctly with rectangle, ellipse and diamond elements 1`] = `
Object {
"angle": 0,
"backgroundColor": "blue",
"boundElements": Array [],
"fillStyle": "cross-hatch",
"groupIds": Array [
"1",
"2",
"3",
],
"height": 200,
"id": "1",
"isDeleted": false,
feat: Support hyperlinks 🔥 (#4620) * feat: Support hypelinks * dont show edit when link not present * auto submit on blur * Add link button in sidebar and do it react way * add key to hyperlink to remount when element selection changes * autofocus input * remove click handler and use pointerup/down to show /hide popup * add keydown and support enter/escape to submit * show extrrnal link icon when element has link * use icons and open link in new tab * dnt submit unless link updated * renamed ffiles * remove unnecessary changes * update snap * hide link popup once user starts interacting with element and show again only if clicked outside and clicked on element again * render link icon outside the element * fix hit testing * rewrite implementation to render hyperlinks outside elements and hide when element selected * remove * remove * tweak icon position and size * rotate link icon when element rotated, handle zooming and render exactly where ne resize handle is rendered * no need to create a new reference anymore for element when link added/updated * rotate the link image as well when rotating element * calculate hitbox of link icon and show pointer when hovering over link icon * open link when clicked on link icon * show tooltip when hovering over link icon * show link action only when single element selected * support other protocols * add shortcut cmd/ctrl+k to edit/update link * don't hide popup after submit * renderes decreased woo * Add context mneu label to add/edit link * fix tests * remove tick and show trash when in edit mode * show edit view when element contains link * fix snap * horizontally center the hyperlink container with respect to elemnt * fix padding * remove checkcircle * show popup on hover of selected element and dismiss when outside hitbox * check if element has link before setting popup state * move logic of auto hide to hyperlink and dnt hide when editing * hide popover when drag/resize/rotate * unmount during autohide * autohide after 500ms * fix regression * prevent cmd/ctrl+k when inside link editor * submit when input not updated * allow custom urls * fix centering of popup when zoomed * fix hitbox during zoom * fix * tweak link normalization * touch hyperlink tooltip DOM only if needed * consider 0 if no offsetY * reduce hitbox of link icon and make sure link icon doesn't show on top of higher z-index elements * show link tooltip only if element has higher z-index * dnt show hyperlink popup when selection changes from element with link to element with no link and also hide popover when element type changes from selection to something else * lint: EOL * fix link icon tooltip positioning * open the link only when last pointer down and last pointer up hit the link hitbox * render tooltip after 300ms delay * ensure link popup and editor input have same height * wip: cache the link icon canvas * fix the image quality after caching using device pixel ratio yay * some cleanup * remove unused selectedElementIds from renderConfig * Update src/renderer/renderElement.ts * fix `opener` vulnerability * tweak styling * decrease padding * open local links in the same tab * fix caching * code style refactor * remove unnecessary save & restore * show link shortcut in help dialog * submit on cmd/ctrl+k * merge state props * Add title for link * update editview if prop changes * tweak link action logic * make `Hyperlink` compo editor state fully controlled * dont show popup when context menu open * show in contextMenu only for single selection & change pos * set button `selected` state * set contextMenuOpen on pointerdown * set contextMenyOpen to false when action triggered * don't render link icons on export * fix tests * fix buttons wrap * move focus states to input top-level rule * fix elements sharing `Hyperlink` state * fix hitbox for link icon in case of rect * Early return if hitting link icon Co-authored-by: dwelle <luzar.david@gmail.com>
2022-02-03 15:04:59 +00:00
"link": null,
"locked": false,
"opacity": 10,
"roughness": 2,
"roundness": Object {
"type": 3,
},
"seed": Any<Number>,
"strokeColor": "red",
"strokeStyle": "dashed",
"strokeWidth": 2,
"type": "rectangle",
2021-11-24 17:38:33 +00:00
"updated": 1,
"version": 1,
"versionNonce": 0,
"width": 100,
"x": 10,
"y": 20,
}
`;
exports[`restoreElements should restore correctly with rectangle, ellipse and diamond elements 2`] = `
Object {
"angle": 0,
"backgroundColor": "blue",
"boundElements": Array [],
"fillStyle": "cross-hatch",
"groupIds": Array [
"1",
"2",
"3",
],
"height": 200,
"id": "2",
"isDeleted": false,
feat: Support hyperlinks 🔥 (#4620) * feat: Support hypelinks * dont show edit when link not present * auto submit on blur * Add link button in sidebar and do it react way * add key to hyperlink to remount when element selection changes * autofocus input * remove click handler and use pointerup/down to show /hide popup * add keydown and support enter/escape to submit * show extrrnal link icon when element has link * use icons and open link in new tab * dnt submit unless link updated * renamed ffiles * remove unnecessary changes * update snap * hide link popup once user starts interacting with element and show again only if clicked outside and clicked on element again * render link icon outside the element * fix hit testing * rewrite implementation to render hyperlinks outside elements and hide when element selected * remove * remove * tweak icon position and size * rotate link icon when element rotated, handle zooming and render exactly where ne resize handle is rendered * no need to create a new reference anymore for element when link added/updated * rotate the link image as well when rotating element * calculate hitbox of link icon and show pointer when hovering over link icon * open link when clicked on link icon * show tooltip when hovering over link icon * show link action only when single element selected * support other protocols * add shortcut cmd/ctrl+k to edit/update link * don't hide popup after submit * renderes decreased woo * Add context mneu label to add/edit link * fix tests * remove tick and show trash when in edit mode * show edit view when element contains link * fix snap * horizontally center the hyperlink container with respect to elemnt * fix padding * remove checkcircle * show popup on hover of selected element and dismiss when outside hitbox * check if element has link before setting popup state * move logic of auto hide to hyperlink and dnt hide when editing * hide popover when drag/resize/rotate * unmount during autohide * autohide after 500ms * fix regression * prevent cmd/ctrl+k when inside link editor * submit when input not updated * allow custom urls * fix centering of popup when zoomed * fix hitbox during zoom * fix * tweak link normalization * touch hyperlink tooltip DOM only if needed * consider 0 if no offsetY * reduce hitbox of link icon and make sure link icon doesn't show on top of higher z-index elements * show link tooltip only if element has higher z-index * dnt show hyperlink popup when selection changes from element with link to element with no link and also hide popover when element type changes from selection to something else * lint: EOL * fix link icon tooltip positioning * open the link only when last pointer down and last pointer up hit the link hitbox * render tooltip after 300ms delay * ensure link popup and editor input have same height * wip: cache the link icon canvas * fix the image quality after caching using device pixel ratio yay * some cleanup * remove unused selectedElementIds from renderConfig * Update src/renderer/renderElement.ts * fix `opener` vulnerability * tweak styling * decrease padding * open local links in the same tab * fix caching * code style refactor * remove unnecessary save & restore * show link shortcut in help dialog * submit on cmd/ctrl+k * merge state props * Add title for link * update editview if prop changes * tweak link action logic * make `Hyperlink` compo editor state fully controlled * dont show popup when context menu open * show in contextMenu only for single selection & change pos * set button `selected` state * set contextMenuOpen on pointerdown * set contextMenyOpen to false when action triggered * don't render link icons on export * fix tests * fix buttons wrap * move focus states to input top-level rule * fix elements sharing `Hyperlink` state * fix hitbox for link icon in case of rect * Early return if hitting link icon Co-authored-by: dwelle <luzar.david@gmail.com>
2022-02-03 15:04:59 +00:00
"link": null,
"locked": false,
"opacity": 10,
"roughness": 2,
"roundness": Object {
"type": 3,
},
"seed": Any<Number>,
"strokeColor": "red",
"strokeStyle": "dashed",
"strokeWidth": 2,
"type": "ellipse",
2021-11-24 17:38:33 +00:00
"updated": 1,
"version": 1,
"versionNonce": 0,
"width": 100,
"x": 10,
"y": 20,
}
`;
exports[`restoreElements should restore correctly with rectangle, ellipse and diamond elements 3`] = `
Object {
"angle": 0,
"backgroundColor": "blue",
"boundElements": Array [],
"fillStyle": "cross-hatch",
"groupIds": Array [
"1",
"2",
"3",
],
"height": 200,
"id": "3",
"isDeleted": false,
feat: Support hyperlinks 🔥 (#4620) * feat: Support hypelinks * dont show edit when link not present * auto submit on blur * Add link button in sidebar and do it react way * add key to hyperlink to remount when element selection changes * autofocus input * remove click handler and use pointerup/down to show /hide popup * add keydown and support enter/escape to submit * show extrrnal link icon when element has link * use icons and open link in new tab * dnt submit unless link updated * renamed ffiles * remove unnecessary changes * update snap * hide link popup once user starts interacting with element and show again only if clicked outside and clicked on element again * render link icon outside the element * fix hit testing * rewrite implementation to render hyperlinks outside elements and hide when element selected * remove * remove * tweak icon position and size * rotate link icon when element rotated, handle zooming and render exactly where ne resize handle is rendered * no need to create a new reference anymore for element when link added/updated * rotate the link image as well when rotating element * calculate hitbox of link icon and show pointer when hovering over link icon * open link when clicked on link icon * show tooltip when hovering over link icon * show link action only when single element selected * support other protocols * add shortcut cmd/ctrl+k to edit/update link * don't hide popup after submit * renderes decreased woo * Add context mneu label to add/edit link * fix tests * remove tick and show trash when in edit mode * show edit view when element contains link * fix snap * horizontally center the hyperlink container with respect to elemnt * fix padding * remove checkcircle * show popup on hover of selected element and dismiss when outside hitbox * check if element has link before setting popup state * move logic of auto hide to hyperlink and dnt hide when editing * hide popover when drag/resize/rotate * unmount during autohide * autohide after 500ms * fix regression * prevent cmd/ctrl+k when inside link editor * submit when input not updated * allow custom urls * fix centering of popup when zoomed * fix hitbox during zoom * fix * tweak link normalization * touch hyperlink tooltip DOM only if needed * consider 0 if no offsetY * reduce hitbox of link icon and make sure link icon doesn't show on top of higher z-index elements * show link tooltip only if element has higher z-index * dnt show hyperlink popup when selection changes from element with link to element with no link and also hide popover when element type changes from selection to something else * lint: EOL * fix link icon tooltip positioning * open the link only when last pointer down and last pointer up hit the link hitbox * render tooltip after 300ms delay * ensure link popup and editor input have same height * wip: cache the link icon canvas * fix the image quality after caching using device pixel ratio yay * some cleanup * remove unused selectedElementIds from renderConfig * Update src/renderer/renderElement.ts * fix `opener` vulnerability * tweak styling * decrease padding * open local links in the same tab * fix caching * code style refactor * remove unnecessary save & restore * show link shortcut in help dialog * submit on cmd/ctrl+k * merge state props * Add title for link * update editview if prop changes * tweak link action logic * make `Hyperlink` compo editor state fully controlled * dont show popup when context menu open * show in contextMenu only for single selection & change pos * set button `selected` state * set contextMenuOpen on pointerdown * set contextMenyOpen to false when action triggered * don't render link icons on export * fix tests * fix buttons wrap * move focus states to input top-level rule * fix elements sharing `Hyperlink` state * fix hitbox for link icon in case of rect * Early return if hitting link icon Co-authored-by: dwelle <luzar.david@gmail.com>
2022-02-03 15:04:59 +00:00
"link": null,
"locked": false,
"opacity": 10,
"roughness": 2,
"roundness": Object {
"type": 3,
},
"seed": Any<Number>,
"strokeColor": "red",
"strokeStyle": "dashed",
"strokeWidth": 2,
"type": "diamond",
2021-11-24 17:38:33 +00:00
"updated": 1,
"version": 1,
"versionNonce": 0,
"width": 100,
"x": 10,
"y": 20,
}
`;
exports[`restoreElements should restore freedraw element correctly 1`] = `
Object {
"angle": 0,
"backgroundColor": "transparent",
"boundElements": Array [],
"fillStyle": "hachure",
"groupIds": Array [],
"height": 0,
"id": "id-freedraw01",
"isDeleted": false,
"lastCommittedPoint": null,
feat: Support hyperlinks 🔥 (#4620) * feat: Support hypelinks * dont show edit when link not present * auto submit on blur * Add link button in sidebar and do it react way * add key to hyperlink to remount when element selection changes * autofocus input * remove click handler and use pointerup/down to show /hide popup * add keydown and support enter/escape to submit * show extrrnal link icon when element has link * use icons and open link in new tab * dnt submit unless link updated * renamed ffiles * remove unnecessary changes * update snap * hide link popup once user starts interacting with element and show again only if clicked outside and clicked on element again * render link icon outside the element * fix hit testing * rewrite implementation to render hyperlinks outside elements and hide when element selected * remove * remove * tweak icon position and size * rotate link icon when element rotated, handle zooming and render exactly where ne resize handle is rendered * no need to create a new reference anymore for element when link added/updated * rotate the link image as well when rotating element * calculate hitbox of link icon and show pointer when hovering over link icon * open link when clicked on link icon * show tooltip when hovering over link icon * show link action only when single element selected * support other protocols * add shortcut cmd/ctrl+k to edit/update link * don't hide popup after submit * renderes decreased woo * Add context mneu label to add/edit link * fix tests * remove tick and show trash when in edit mode * show edit view when element contains link * fix snap * horizontally center the hyperlink container with respect to elemnt * fix padding * remove checkcircle * show popup on hover of selected element and dismiss when outside hitbox * check if element has link before setting popup state * move logic of auto hide to hyperlink and dnt hide when editing * hide popover when drag/resize/rotate * unmount during autohide * autohide after 500ms * fix regression * prevent cmd/ctrl+k when inside link editor * submit when input not updated * allow custom urls * fix centering of popup when zoomed * fix hitbox during zoom * fix * tweak link normalization * touch hyperlink tooltip DOM only if needed * consider 0 if no offsetY * reduce hitbox of link icon and make sure link icon doesn't show on top of higher z-index elements * show link tooltip only if element has higher z-index * dnt show hyperlink popup when selection changes from element with link to element with no link and also hide popover when element type changes from selection to something else * lint: EOL * fix link icon tooltip positioning * open the link only when last pointer down and last pointer up hit the link hitbox * render tooltip after 300ms delay * ensure link popup and editor input have same height * wip: cache the link icon canvas * fix the image quality after caching using device pixel ratio yay * some cleanup * remove unused selectedElementIds from renderConfig * Update src/renderer/renderElement.ts * fix `opener` vulnerability * tweak styling * decrease padding * open local links in the same tab * fix caching * code style refactor * remove unnecessary save & restore * show link shortcut in help dialog * submit on cmd/ctrl+k * merge state props * Add title for link * update editview if prop changes * tweak link action logic * make `Hyperlink` compo editor state fully controlled * dont show popup when context menu open * show in contextMenu only for single selection & change pos * set button `selected` state * set contextMenuOpen on pointerdown * set contextMenyOpen to false when action triggered * don't render link icons on export * fix tests * fix buttons wrap * move focus states to input top-level rule * fix elements sharing `Hyperlink` state * fix hitbox for link icon in case of rect * Early return if hitting link icon Co-authored-by: dwelle <luzar.david@gmail.com>
2022-02-03 15:04:59 +00:00
"link": null,
"locked": false,
"opacity": 100,
"points": Array [],
"pressures": Array [],
"roughness": 1,
"roundness": Object {
"type": 3,
},
"seed": Any<Number>,
"simulatePressure": true,
"strokeColor": "#1e1e1e",
"strokeStyle": "solid",
"strokeWidth": 1,
"type": "freedraw",
2021-11-24 17:38:33 +00:00
"updated": 1,
"version": 1,
"versionNonce": 0,
"width": 0,
"x": 0,
"y": 0,
}
`;
exports[`restoreElements should restore line and draw elements correctly 1`] = `
Object {
"angle": 0,
"backgroundColor": "transparent",
"boundElements": Array [],
"endArrowhead": null,
"endBinding": null,
"fillStyle": "hachure",
"groupIds": Array [],
"height": 100,
"id": "id-line01",
"isDeleted": false,
"lastCommittedPoint": null,
feat: Support hyperlinks 🔥 (#4620) * feat: Support hypelinks * dont show edit when link not present * auto submit on blur * Add link button in sidebar and do it react way * add key to hyperlink to remount when element selection changes * autofocus input * remove click handler and use pointerup/down to show /hide popup * add keydown and support enter/escape to submit * show extrrnal link icon when element has link * use icons and open link in new tab * dnt submit unless link updated * renamed ffiles * remove unnecessary changes * update snap * hide link popup once user starts interacting with element and show again only if clicked outside and clicked on element again * render link icon outside the element * fix hit testing * rewrite implementation to render hyperlinks outside elements and hide when element selected * remove * remove * tweak icon position and size * rotate link icon when element rotated, handle zooming and render exactly where ne resize handle is rendered * no need to create a new reference anymore for element when link added/updated * rotate the link image as well when rotating element * calculate hitbox of link icon and show pointer when hovering over link icon * open link when clicked on link icon * show tooltip when hovering over link icon * show link action only when single element selected * support other protocols * add shortcut cmd/ctrl+k to edit/update link * don't hide popup after submit * renderes decreased woo * Add context mneu label to add/edit link * fix tests * remove tick and show trash when in edit mode * show edit view when element contains link * fix snap * horizontally center the hyperlink container with respect to elemnt * fix padding * remove checkcircle * show popup on hover of selected element and dismiss when outside hitbox * check if element has link before setting popup state * move logic of auto hide to hyperlink and dnt hide when editing * hide popover when drag/resize/rotate * unmount during autohide * autohide after 500ms * fix regression * prevent cmd/ctrl+k when inside link editor * submit when input not updated * allow custom urls * fix centering of popup when zoomed * fix hitbox during zoom * fix * tweak link normalization * touch hyperlink tooltip DOM only if needed * consider 0 if no offsetY * reduce hitbox of link icon and make sure link icon doesn't show on top of higher z-index elements * show link tooltip only if element has higher z-index * dnt show hyperlink popup when selection changes from element with link to element with no link and also hide popover when element type changes from selection to something else * lint: EOL * fix link icon tooltip positioning * open the link only when last pointer down and last pointer up hit the link hitbox * render tooltip after 300ms delay * ensure link popup and editor input have same height * wip: cache the link icon canvas * fix the image quality after caching using device pixel ratio yay * some cleanup * remove unused selectedElementIds from renderConfig * Update src/renderer/renderElement.ts * fix `opener` vulnerability * tweak styling * decrease padding * open local links in the same tab * fix caching * code style refactor * remove unnecessary save & restore * show link shortcut in help dialog * submit on cmd/ctrl+k * merge state props * Add title for link * update editview if prop changes * tweak link action logic * make `Hyperlink` compo editor state fully controlled * dont show popup when context menu open * show in contextMenu only for single selection & change pos * set button `selected` state * set contextMenuOpen on pointerdown * set contextMenyOpen to false when action triggered * don't render link icons on export * fix tests * fix buttons wrap * move focus states to input top-level rule * fix elements sharing `Hyperlink` state * fix hitbox for link icon in case of rect * Early return if hitting link icon Co-authored-by: dwelle <luzar.david@gmail.com>
2022-02-03 15:04:59 +00:00
"link": null,
"locked": false,
"opacity": 100,
"points": Array [
Array [
0,
0,
],
Array [
100,
100,
],
],
"roughness": 1,
"roundness": Object {
"type": 2,
},
"seed": Any<Number>,
"startArrowhead": null,
"startBinding": null,
"strokeColor": "#1e1e1e",
"strokeStyle": "solid",
"strokeWidth": 1,
"type": "line",
2021-11-24 17:38:33 +00:00
"updated": 1,
"version": 1,
"versionNonce": 0,
"width": 100,
"x": 0,
"y": 0,
}
`;
exports[`restoreElements should restore line and draw elements correctly 2`] = `
Object {
"angle": 0,
"backgroundColor": "transparent",
"boundElements": Array [],
"endArrowhead": null,
"endBinding": null,
"fillStyle": "hachure",
"groupIds": Array [],
"height": 100,
"id": "id-draw01",
"isDeleted": false,
"lastCommittedPoint": null,
feat: Support hyperlinks 🔥 (#4620) * feat: Support hypelinks * dont show edit when link not present * auto submit on blur * Add link button in sidebar and do it react way * add key to hyperlink to remount when element selection changes * autofocus input * remove click handler and use pointerup/down to show /hide popup * add keydown and support enter/escape to submit * show extrrnal link icon when element has link * use icons and open link in new tab * dnt submit unless link updated * renamed ffiles * remove unnecessary changes * update snap * hide link popup once user starts interacting with element and show again only if clicked outside and clicked on element again * render link icon outside the element * fix hit testing * rewrite implementation to render hyperlinks outside elements and hide when element selected * remove * remove * tweak icon position and size * rotate link icon when element rotated, handle zooming and render exactly where ne resize handle is rendered * no need to create a new reference anymore for element when link added/updated * rotate the link image as well when rotating element * calculate hitbox of link icon and show pointer when hovering over link icon * open link when clicked on link icon * show tooltip when hovering over link icon * show link action only when single element selected * support other protocols * add shortcut cmd/ctrl+k to edit/update link * don't hide popup after submit * renderes decreased woo * Add context mneu label to add/edit link * fix tests * remove tick and show trash when in edit mode * show edit view when element contains link * fix snap * horizontally center the hyperlink container with respect to elemnt * fix padding * remove checkcircle * show popup on hover of selected element and dismiss when outside hitbox * check if element has link before setting popup state * move logic of auto hide to hyperlink and dnt hide when editing * hide popover when drag/resize/rotate * unmount during autohide * autohide after 500ms * fix regression * prevent cmd/ctrl+k when inside link editor * submit when input not updated * allow custom urls * fix centering of popup when zoomed * fix hitbox during zoom * fix * tweak link normalization * touch hyperlink tooltip DOM only if needed * consider 0 if no offsetY * reduce hitbox of link icon and make sure link icon doesn't show on top of higher z-index elements * show link tooltip only if element has higher z-index * dnt show hyperlink popup when selection changes from element with link to element with no link and also hide popover when element type changes from selection to something else * lint: EOL * fix link icon tooltip positioning * open the link only when last pointer down and last pointer up hit the link hitbox * render tooltip after 300ms delay * ensure link popup and editor input have same height * wip: cache the link icon canvas * fix the image quality after caching using device pixel ratio yay * some cleanup * remove unused selectedElementIds from renderConfig * Update src/renderer/renderElement.ts * fix `opener` vulnerability * tweak styling * decrease padding * open local links in the same tab * fix caching * code style refactor * remove unnecessary save & restore * show link shortcut in help dialog * submit on cmd/ctrl+k * merge state props * Add title for link * update editview if prop changes * tweak link action logic * make `Hyperlink` compo editor state fully controlled * dont show popup when context menu open * show in contextMenu only for single selection & change pos * set button `selected` state * set contextMenuOpen on pointerdown * set contextMenyOpen to false when action triggered * don't render link icons on export * fix tests * fix buttons wrap * move focus states to input top-level rule * fix elements sharing `Hyperlink` state * fix hitbox for link icon in case of rect * Early return if hitting link icon Co-authored-by: dwelle <luzar.david@gmail.com>
2022-02-03 15:04:59 +00:00
"link": null,
"locked": false,
"opacity": 100,
"points": Array [
Array [
0,
0,
],
Array [
100,
100,
],
],
"roughness": 1,
"roundness": Object {
"type": 2,
},
"seed": Any<Number>,
"startArrowhead": null,
"startBinding": null,
"strokeColor": "#1e1e1e",
"strokeStyle": "solid",
"strokeWidth": 1,
"type": "line",
2021-11-24 17:38:33 +00:00
"updated": 1,
"version": 1,
"versionNonce": 0,
"width": 100,
"x": 0,
"y": 0,
}
`;
exports[`restoreElements should restore text element correctly passing value for each attribute 1`] = `
Object {
"angle": 0,
"backgroundColor": "transparent",
"baseline": 0,
"boundElements": Array [],
feat: bind text to shapes when pressing enter and support sticky notes 🎉 (#4343) * feat: Word wrap inside rect and increase height when size exceeded * fixes for auto increase in height * fix height * respect newlines when wrapping text * shift text area when height increases beyond mid rect height until it reaches to the top * select bound text if present when rect selected * mutate y coord after text submit * Add padding of 30px and update dimensions acordingly * Don't allow selecting bound text element directly * support deletion of bound text element when rect deleted * trim text * Support autoshrink and improve algo * calculate approx line height instead of hardcoding * use textContainerId instead of storing textContainer element itself * rename boundTextElement -> boundTextElementId * fix text properties not getting reflected after edit inside rect * Support resizing * remove ts ignore * increase height of container when text height increases while resizing * use original text when editing/resizing so it adjusts based on original text * fix tests * add util isRectangleElement * use isTextElement util everywhere * disable selecting text inside rect when selectAll * Bind text to circle and diamond as well * fix tests * vertically center align the text always * better vertical align * Disable binding arrows for text inside shapes * set min width for text container when text is binded to container * update dimensions of container if its less than min width/ min height * Allow selecting of text container for transparent containers when clicked inside * fix test * preserve whitespaces between long word exceeding width and next word Use word break instead of whitespace no wrap for better readability and support safari * Perf improvements for measuring text width and resizing * Use canvas measureText instead of our algo. This has reduced the perf ~ 10 times * Rewrite wrapText algo to break in words appropriately and for longer words calculate the char width in order unless max width reached. This makes the the number of runs linear (max text length times) which was earlier textLength * textLength-1/2 as I was slicing the chars from end until max width reached for each run * Add a util to calculate getApproxCharsToFitInWidth to calculate min chars to fit in a line * use console.info so eslint doesnt warn :p * cache char width and don't call resize unless min width exceeded * update line height and height correctly when text properties inside container updated * improve vertical centering when text properties updated, not yet perfect though * when double clicked inside a conatiner take the cursor to end of text same as what happens when enter is pressed * Add hint when container selected * Select container when escape key is pressed after submitting text * fix copy/paste when using copy/paste action * fix copy when dragged with alt pressed * fix export to svg/png * fix add to library * Fix copy as png/svg * Don't allow selecting text when using selection tool and support resizing when multiple elements include ones with binded text selectec * fix rotation jump * moove all text utils to textElement.ts * resize text element only after container resized so that width doesnt change when editing * insert the remaining chars for long words once it goes beyond line * fix typo, use string for character type * renaming * fix bugs in word wrap algo * make grouping work * set boundTextElementId only when text present else unset it * rename textContainerId to containerId * fix * fix snap * use originalText in redrawTextBoundingBox so height is calculated properly and center align works after props updated * use boundElementIds and also support binding text in images 🎉 * fix the sw/se ends when resizing from ne/nw * fix y coord when resizing from north * bind when enter is pressed, double click/text tool willl edit the binded text if present else create a new text * bind when clicked on center of container * use pre-wrap instead of normal so it works in ff * use container boundTextElement when container present and trying to edit text * review fixes * make getBoundTextElementId type safe and check for existence when using this function * fix * don't duplicate boundElementIds when text submitted * only remove last trailing space if present which we have added when joining words * set width correctly when resizing to fix alignment issues * make duplication work using cmd/ctrl+d * set X coord correctly during resize * don't allow resize to negative dimensions when text is bounded to container * fix, check last char is space * remove logs * make sure text editor doesn't go beyond viewport and set container dimensions in case it overflows * add a util isTextBindableContainer to check if the container could bind text
2021-12-16 15:44:03 +00:00
"containerId": null,
"fillStyle": "hachure",
"fontFamily": 1,
"fontSize": 14,
"groupIds": Array [],
"height": 100,
"id": "id-text01",
"isDeleted": false,
"lineHeight": 1.25,
feat: Support hyperlinks 🔥 (#4620) * feat: Support hypelinks * dont show edit when link not present * auto submit on blur * Add link button in sidebar and do it react way * add key to hyperlink to remount when element selection changes * autofocus input * remove click handler and use pointerup/down to show /hide popup * add keydown and support enter/escape to submit * show extrrnal link icon when element has link * use icons and open link in new tab * dnt submit unless link updated * renamed ffiles * remove unnecessary changes * update snap * hide link popup once user starts interacting with element and show again only if clicked outside and clicked on element again * render link icon outside the element * fix hit testing * rewrite implementation to render hyperlinks outside elements and hide when element selected * remove * remove * tweak icon position and size * rotate link icon when element rotated, handle zooming and render exactly where ne resize handle is rendered * no need to create a new reference anymore for element when link added/updated * rotate the link image as well when rotating element * calculate hitbox of link icon and show pointer when hovering over link icon * open link when clicked on link icon * show tooltip when hovering over link icon * show link action only when single element selected * support other protocols * add shortcut cmd/ctrl+k to edit/update link * don't hide popup after submit * renderes decreased woo * Add context mneu label to add/edit link * fix tests * remove tick and show trash when in edit mode * show edit view when element contains link * fix snap * horizontally center the hyperlink container with respect to elemnt * fix padding * remove checkcircle * show popup on hover of selected element and dismiss when outside hitbox * check if element has link before setting popup state * move logic of auto hide to hyperlink and dnt hide when editing * hide popover when drag/resize/rotate * unmount during autohide * autohide after 500ms * fix regression * prevent cmd/ctrl+k when inside link editor * submit when input not updated * allow custom urls * fix centering of popup when zoomed * fix hitbox during zoom * fix * tweak link normalization * touch hyperlink tooltip DOM only if needed * consider 0 if no offsetY * reduce hitbox of link icon and make sure link icon doesn't show on top of higher z-index elements * show link tooltip only if element has higher z-index * dnt show hyperlink popup when selection changes from element with link to element with no link and also hide popover when element type changes from selection to something else * lint: EOL * fix link icon tooltip positioning * open the link only when last pointer down and last pointer up hit the link hitbox * render tooltip after 300ms delay * ensure link popup and editor input have same height * wip: cache the link icon canvas * fix the image quality after caching using device pixel ratio yay * some cleanup * remove unused selectedElementIds from renderConfig * Update src/renderer/renderElement.ts * fix `opener` vulnerability * tweak styling * decrease padding * open local links in the same tab * fix caching * code style refactor * remove unnecessary save & restore * show link shortcut in help dialog * submit on cmd/ctrl+k * merge state props * Add title for link * update editview if prop changes * tweak link action logic * make `Hyperlink` compo editor state fully controlled * dont show popup when context menu open * show in contextMenu only for single selection & change pos * set button `selected` state * set contextMenuOpen on pointerdown * set contextMenyOpen to false when action triggered * don't render link icons on export * fix tests * fix buttons wrap * move focus states to input top-level rule * fix elements sharing `Hyperlink` state * fix hitbox for link icon in case of rect * Early return if hitting link icon Co-authored-by: dwelle <luzar.david@gmail.com>
2022-02-03 15:04:59 +00:00
"link": null,
"locked": false,
"opacity": 100,
feat: bind text to shapes when pressing enter and support sticky notes 🎉 (#4343) * feat: Word wrap inside rect and increase height when size exceeded * fixes for auto increase in height * fix height * respect newlines when wrapping text * shift text area when height increases beyond mid rect height until it reaches to the top * select bound text if present when rect selected * mutate y coord after text submit * Add padding of 30px and update dimensions acordingly * Don't allow selecting bound text element directly * support deletion of bound text element when rect deleted * trim text * Support autoshrink and improve algo * calculate approx line height instead of hardcoding * use textContainerId instead of storing textContainer element itself * rename boundTextElement -> boundTextElementId * fix text properties not getting reflected after edit inside rect * Support resizing * remove ts ignore * increase height of container when text height increases while resizing * use original text when editing/resizing so it adjusts based on original text * fix tests * add util isRectangleElement * use isTextElement util everywhere * disable selecting text inside rect when selectAll * Bind text to circle and diamond as well * fix tests * vertically center align the text always * better vertical align * Disable binding arrows for text inside shapes * set min width for text container when text is binded to container * update dimensions of container if its less than min width/ min height * Allow selecting of text container for transparent containers when clicked inside * fix test * preserve whitespaces between long word exceeding width and next word Use word break instead of whitespace no wrap for better readability and support safari * Perf improvements for measuring text width and resizing * Use canvas measureText instead of our algo. This has reduced the perf ~ 10 times * Rewrite wrapText algo to break in words appropriately and for longer words calculate the char width in order unless max width reached. This makes the the number of runs linear (max text length times) which was earlier textLength * textLength-1/2 as I was slicing the chars from end until max width reached for each run * Add a util to calculate getApproxCharsToFitInWidth to calculate min chars to fit in a line * use console.info so eslint doesnt warn :p * cache char width and don't call resize unless min width exceeded * update line height and height correctly when text properties inside container updated * improve vertical centering when text properties updated, not yet perfect though * when double clicked inside a conatiner take the cursor to end of text same as what happens when enter is pressed * Add hint when container selected * Select container when escape key is pressed after submitting text * fix copy/paste when using copy/paste action * fix copy when dragged with alt pressed * fix export to svg/png * fix add to library * Fix copy as png/svg * Don't allow selecting text when using selection tool and support resizing when multiple elements include ones with binded text selectec * fix rotation jump * moove all text utils to textElement.ts * resize text element only after container resized so that width doesnt change when editing * insert the remaining chars for long words once it goes beyond line * fix typo, use string for character type * renaming * fix bugs in word wrap algo * make grouping work * set boundTextElementId only when text present else unset it * rename textContainerId to containerId * fix * fix snap * use originalText in redrawTextBoundingBox so height is calculated properly and center align works after props updated * use boundElementIds and also support binding text in images 🎉 * fix the sw/se ends when resizing from ne/nw * fix y coord when resizing from north * bind when enter is pressed, double click/text tool willl edit the binded text if present else create a new text * bind when clicked on center of container * use pre-wrap instead of normal so it works in ff * use container boundTextElement when container present and trying to edit text * review fixes * make getBoundTextElementId type safe and check for existence when using this function * fix * don't duplicate boundElementIds when text submitted * only remove last trailing space if present which we have added when joining words * set width correctly when resizing to fix alignment issues * make duplication work using cmd/ctrl+d * set X coord correctly during resize * don't allow resize to negative dimensions when text is bounded to container * fix, check last char is space * remove logs * make sure text editor doesn't go beyond viewport and set container dimensions in case it overflows * add a util isTextBindableContainer to check if the container could bind text
2021-12-16 15:44:03 +00:00
"originalText": "text",
"roughness": 1,
"roundness": Object {
"type": 3,
},
"seed": Any<Number>,
"strokeColor": "#1e1e1e",
"strokeStyle": "solid",
"strokeWidth": 1,
"text": "text",
"textAlign": "center",
"type": "text",
2021-11-24 17:38:33 +00:00
"updated": 1,
"version": 1,
"versionNonce": 0,
"verticalAlign": "middle",
"width": 100,
"x": -20,
"y": -8.75,
}
`;
exports[`restoreElements should restore text element correctly with unknown font family, null text and undefined alignment 1`] = `
Object {
"angle": 0,
"backgroundColor": "transparent",
"baseline": 0,
"boundElements": Array [],
feat: bind text to shapes when pressing enter and support sticky notes 🎉 (#4343) * feat: Word wrap inside rect and increase height when size exceeded * fixes for auto increase in height * fix height * respect newlines when wrapping text * shift text area when height increases beyond mid rect height until it reaches to the top * select bound text if present when rect selected * mutate y coord after text submit * Add padding of 30px and update dimensions acordingly * Don't allow selecting bound text element directly * support deletion of bound text element when rect deleted * trim text * Support autoshrink and improve algo * calculate approx line height instead of hardcoding * use textContainerId instead of storing textContainer element itself * rename boundTextElement -> boundTextElementId * fix text properties not getting reflected after edit inside rect * Support resizing * remove ts ignore * increase height of container when text height increases while resizing * use original text when editing/resizing so it adjusts based on original text * fix tests * add util isRectangleElement * use isTextElement util everywhere * disable selecting text inside rect when selectAll * Bind text to circle and diamond as well * fix tests * vertically center align the text always * better vertical align * Disable binding arrows for text inside shapes * set min width for text container when text is binded to container * update dimensions of container if its less than min width/ min height * Allow selecting of text container for transparent containers when clicked inside * fix test * preserve whitespaces between long word exceeding width and next word Use word break instead of whitespace no wrap for better readability and support safari * Perf improvements for measuring text width and resizing * Use canvas measureText instead of our algo. This has reduced the perf ~ 10 times * Rewrite wrapText algo to break in words appropriately and for longer words calculate the char width in order unless max width reached. This makes the the number of runs linear (max text length times) which was earlier textLength * textLength-1/2 as I was slicing the chars from end until max width reached for each run * Add a util to calculate getApproxCharsToFitInWidth to calculate min chars to fit in a line * use console.info so eslint doesnt warn :p * cache char width and don't call resize unless min width exceeded * update line height and height correctly when text properties inside container updated * improve vertical centering when text properties updated, not yet perfect though * when double clicked inside a conatiner take the cursor to end of text same as what happens when enter is pressed * Add hint when container selected * Select container when escape key is pressed after submitting text * fix copy/paste when using copy/paste action * fix copy when dragged with alt pressed * fix export to svg/png * fix add to library * Fix copy as png/svg * Don't allow selecting text when using selection tool and support resizing when multiple elements include ones with binded text selectec * fix rotation jump * moove all text utils to textElement.ts * resize text element only after container resized so that width doesnt change when editing * insert the remaining chars for long words once it goes beyond line * fix typo, use string for character type * renaming * fix bugs in word wrap algo * make grouping work * set boundTextElementId only when text present else unset it * rename textContainerId to containerId * fix * fix snap * use originalText in redrawTextBoundingBox so height is calculated properly and center align works after props updated * use boundElementIds and also support binding text in images 🎉 * fix the sw/se ends when resizing from ne/nw * fix y coord when resizing from north * bind when enter is pressed, double click/text tool willl edit the binded text if present else create a new text * bind when clicked on center of container * use pre-wrap instead of normal so it works in ff * use container boundTextElement when container present and trying to edit text * review fixes * make getBoundTextElementId type safe and check for existence when using this function * fix * don't duplicate boundElementIds when text submitted * only remove last trailing space if present which we have added when joining words * set width correctly when resizing to fix alignment issues * make duplication work using cmd/ctrl+d * set X coord correctly during resize * don't allow resize to negative dimensions when text is bounded to container * fix, check last char is space * remove logs * make sure text editor doesn't go beyond viewport and set container dimensions in case it overflows * add a util isTextBindableContainer to check if the container could bind text
2021-12-16 15:44:03 +00:00
"containerId": null,
"fillStyle": "hachure",
"fontFamily": 1,
"fontSize": 10,
"groupIds": Array [],
"height": 100,
"id": "id-text01",
"isDeleted": false,
"lineHeight": 1.25,
feat: Support hyperlinks 🔥 (#4620) * feat: Support hypelinks * dont show edit when link not present * auto submit on blur * Add link button in sidebar and do it react way * add key to hyperlink to remount when element selection changes * autofocus input * remove click handler and use pointerup/down to show /hide popup * add keydown and support enter/escape to submit * show extrrnal link icon when element has link * use icons and open link in new tab * dnt submit unless link updated * renamed ffiles * remove unnecessary changes * update snap * hide link popup once user starts interacting with element and show again only if clicked outside and clicked on element again * render link icon outside the element * fix hit testing * rewrite implementation to render hyperlinks outside elements and hide when element selected * remove * remove * tweak icon position and size * rotate link icon when element rotated, handle zooming and render exactly where ne resize handle is rendered * no need to create a new reference anymore for element when link added/updated * rotate the link image as well when rotating element * calculate hitbox of link icon and show pointer when hovering over link icon * open link when clicked on link icon * show tooltip when hovering over link icon * show link action only when single element selected * support other protocols * add shortcut cmd/ctrl+k to edit/update link * don't hide popup after submit * renderes decreased woo * Add context mneu label to add/edit link * fix tests * remove tick and show trash when in edit mode * show edit view when element contains link * fix snap * horizontally center the hyperlink container with respect to elemnt * fix padding * remove checkcircle * show popup on hover of selected element and dismiss when outside hitbox * check if element has link before setting popup state * move logic of auto hide to hyperlink and dnt hide when editing * hide popover when drag/resize/rotate * unmount during autohide * autohide after 500ms * fix regression * prevent cmd/ctrl+k when inside link editor * submit when input not updated * allow custom urls * fix centering of popup when zoomed * fix hitbox during zoom * fix * tweak link normalization * touch hyperlink tooltip DOM only if needed * consider 0 if no offsetY * reduce hitbox of link icon and make sure link icon doesn't show on top of higher z-index elements * show link tooltip only if element has higher z-index * dnt show hyperlink popup when selection changes from element with link to element with no link and also hide popover when element type changes from selection to something else * lint: EOL * fix link icon tooltip positioning * open the link only when last pointer down and last pointer up hit the link hitbox * render tooltip after 300ms delay * ensure link popup and editor input have same height * wip: cache the link icon canvas * fix the image quality after caching using device pixel ratio yay * some cleanup * remove unused selectedElementIds from renderConfig * Update src/renderer/renderElement.ts * fix `opener` vulnerability * tweak styling * decrease padding * open local links in the same tab * fix caching * code style refactor * remove unnecessary save & restore * show link shortcut in help dialog * submit on cmd/ctrl+k * merge state props * Add title for link * update editview if prop changes * tweak link action logic * make `Hyperlink` compo editor state fully controlled * dont show popup when context menu open * show in contextMenu only for single selection & change pos * set button `selected` state * set contextMenuOpen on pointerdown * set contextMenyOpen to false when action triggered * don't render link icons on export * fix tests * fix buttons wrap * move focus states to input top-level rule * fix elements sharing `Hyperlink` state * fix hitbox for link icon in case of rect * Early return if hitting link icon Co-authored-by: dwelle <luzar.david@gmail.com>
2022-02-03 15:04:59 +00:00
"link": null,
"locked": false,
"opacity": 100,
feat: bind text to shapes when pressing enter and support sticky notes 🎉 (#4343) * feat: Word wrap inside rect and increase height when size exceeded * fixes for auto increase in height * fix height * respect newlines when wrapping text * shift text area when height increases beyond mid rect height until it reaches to the top * select bound text if present when rect selected * mutate y coord after text submit * Add padding of 30px and update dimensions acordingly * Don't allow selecting bound text element directly * support deletion of bound text element when rect deleted * trim text * Support autoshrink and improve algo * calculate approx line height instead of hardcoding * use textContainerId instead of storing textContainer element itself * rename boundTextElement -> boundTextElementId * fix text properties not getting reflected after edit inside rect * Support resizing * remove ts ignore * increase height of container when text height increases while resizing * use original text when editing/resizing so it adjusts based on original text * fix tests * add util isRectangleElement * use isTextElement util everywhere * disable selecting text inside rect when selectAll * Bind text to circle and diamond as well * fix tests * vertically center align the text always * better vertical align * Disable binding arrows for text inside shapes * set min width for text container when text is binded to container * update dimensions of container if its less than min width/ min height * Allow selecting of text container for transparent containers when clicked inside * fix test * preserve whitespaces between long word exceeding width and next word Use word break instead of whitespace no wrap for better readability and support safari * Perf improvements for measuring text width and resizing * Use canvas measureText instead of our algo. This has reduced the perf ~ 10 times * Rewrite wrapText algo to break in words appropriately and for longer words calculate the char width in order unless max width reached. This makes the the number of runs linear (max text length times) which was earlier textLength * textLength-1/2 as I was slicing the chars from end until max width reached for each run * Add a util to calculate getApproxCharsToFitInWidth to calculate min chars to fit in a line * use console.info so eslint doesnt warn :p * cache char width and don't call resize unless min width exceeded * update line height and height correctly when text properties inside container updated * improve vertical centering when text properties updated, not yet perfect though * when double clicked inside a conatiner take the cursor to end of text same as what happens when enter is pressed * Add hint when container selected * Select container when escape key is pressed after submitting text * fix copy/paste when using copy/paste action * fix copy when dragged with alt pressed * fix export to svg/png * fix add to library * Fix copy as png/svg * Don't allow selecting text when using selection tool and support resizing when multiple elements include ones with binded text selectec * fix rotation jump * moove all text utils to textElement.ts * resize text element only after container resized so that width doesnt change when editing * insert the remaining chars for long words once it goes beyond line * fix typo, use string for character type * renaming * fix bugs in word wrap algo * make grouping work * set boundTextElementId only when text present else unset it * rename textContainerId to containerId * fix * fix snap * use originalText in redrawTextBoundingBox so height is calculated properly and center align works after props updated * use boundElementIds and also support binding text in images 🎉 * fix the sw/se ends when resizing from ne/nw * fix y coord when resizing from north * bind when enter is pressed, double click/text tool willl edit the binded text if present else create a new text * bind when clicked on center of container * use pre-wrap instead of normal so it works in ff * use container boundTextElement when container present and trying to edit text * review fixes * make getBoundTextElementId type safe and check for existence when using this function * fix * don't duplicate boundElementIds when text submitted * only remove last trailing space if present which we have added when joining words * set width correctly when resizing to fix alignment issues * make duplication work using cmd/ctrl+d * set X coord correctly during resize * don't allow resize to negative dimensions when text is bounded to container * fix, check last char is space * remove logs * make sure text editor doesn't go beyond viewport and set container dimensions in case it overflows * add a util isTextBindableContainer to check if the container could bind text
2021-12-16 15:44:03 +00:00
"originalText": "test",
"roughness": 1,
"roundness": Object {
"type": 3,
},
"seed": Any<Number>,
"strokeColor": "#1e1e1e",
"strokeStyle": "solid",
"strokeWidth": 1,
"text": "",
"textAlign": "left",
"type": "text",
2021-11-24 17:38:33 +00:00
"updated": 1,
"version": 1,
"versionNonce": 0,
"verticalAlign": "top",
"width": 100,
"x": 0,
"y": 0,
}
`;