Skip to content

Virtual whiteboard for sketching hand-drawn like diagrams

Aligns arrowhead schemas (#2517)

Steve Ruiz9cfe7b45e5e6
diff --git a/src/actions/actionProperties.tsx b/src/actions/actionProperties.tsx
index 2589fc77d8..a818cf245c 100644
--- a/src/actions/actionProperties.tsx
+++ b/src/actions/actionProperties.tsx
@@ -667,10 +667,9 @@ export const actionChangeArrowhead = register({
}),
appState: {
...appState,
- currentItemArrowheads: {
- ...appState.currentItemArrowheads,
- [value.position]: value.type,
- },
+ [value.position === "start"
+ ? "currentItemStartArrowhead"
+ : "currentItemEndArrowhead"]: value.type,
},
commitToHistory: true,
};
@@ -731,8 +730,8 @@ export const actionChangeArrowhead = register({
(element) =>
isLinearElement(element) && canHaveArrowheads(element.type)
? element.startArrowhead
- : appState.currentItemArrowheads.start,
- appState.currentItemArrowheads.start,
+ : appState.currentItemStartArrowhead,
+ appState.currentItemStartArrowhead,
)}
onChange={(value) => updateData({ position: "start", type: value })}
/>
@@ -786,8 +785,8 @@ export const actionChangeArrowhead = register({
(element) =>
isLinearElement(element) && canHaveArrowheads(element.type)
? element.endArrowhead
- : appState.currentItemArrowheads.end,
- appState.currentItemArrowheads.end,
+ : appState.currentItemEndArrowhead,
+ appState.currentItemEndArrowhead,
)}
onChange={(value) => updateData({ position: "end", type: value })}
/>
diff --git a/src/appState.ts b/src/appState.ts
index 0fd8820873..3b37433d9e 100644
--- a/src/appState.ts
+++ b/src/appState.ts
@@ -39,7 +39,8 @@ export const getDefaultAppState = (): Omit<
currentItemTextAlign: DEFAULT_TEXT_ALIGN,
currentItemStrokeSharpness: "sharp",
currentItemLinearStrokeSharpness: "round",
- currentItemArrowheads: { start: null, end: "arrow" },
+ currentItemStartArrowhead: null,
+ currentItemEndArrowhead: "arrow",
viewBackgroundColor: oc.white,
scrollX: 0 as FlooredNumber,
scrollY: 0 as FlooredNumber,
@@ -104,7 +105,8 @@ const APP_STATE_STORAGE_CONF = (<
currentItemTextAlign: { browser: true, export: false },
currentItemStrokeSharpness: { browser: true, export: false },
currentItemLinearStrokeSharpness: { browser: true, export: false },
- currentItemArrowheads: { browser: true, export: false },
+ currentItemStartArrowhead: { browser: true, export: false },
+ currentItemEndArrowhead: { browser: true, export: false },
cursorButton: { browser: true, export: false },
cursorX: { browser: true, export: false },
cursorY: { browser: true, export: false },
diff --git a/src/components/App.tsx b/src/components/App.tsx
index 87dbe95d88..a34b1a84a9 100644
--- a/src/components/App.tsx
+++ b/src/components/App.tsx
@@ -2578,12 +2578,16 @@ class App extends React.Component<ExcalidrawProps, AppState> {
elementType === "draw" ? null : this.state.gridSize,
);
- // If arrow is pre-arrowheads, it will have undefined for both start and end arrowheads.
- // If so, we want it to be null/"arrow". If the linear item is not an arrow, we want it
- // to be null/null. Otherwise, we want it to use the currentItemArrowheads values.
- const { start, end } = this.state.currentItemArrowheads;
+ /* If arrow is pre-arrowheads, it will have undefined for both start and end arrowheads.
+ If so, we want it to be null for start and "arrow" for end. If the linear item is not
+ an arrow, we want it to be null for both. Otherwise, we want it to use the
+ values from appState. */
+
+ const { currentItemStartArrowhead, currentItemEndArrowhead } = this.state;
const [startArrowhead, endArrowhead] =
- elementType === "arrow" ? [start, end] : [null, null];
+ elementType === "arrow"
+ ? [currentItemStartArrowhead, currentItemEndArrowhead]
+ : [null, null];
const element = newLinearElement({
type: elementType,
diff --git a/src/tests/__snapshots__/regressionTests.test.tsx.snap b/src/tests/__snapshots__/regressionTests.test.tsx.snap
index 33bd69ccfc..8ffa26a575 100644
--- a/src/tests/__snapshots__/regressionTests.test.tsx.snap
+++ b/src/tests/__snapshots__/regressionTests.test.tsx.snap
@@ -4,17 +4,15 @@ exports[`given element A and group of elements B and given both are selected whe
Object {
"appearance": "light",
"collaborators": Map {},
- "currentItemArrowheads": Object {
- "end": "arrow",
- "start": null,
- },
"currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
"currentItemFillStyle": "hachure",
"currentItemFontFamily": 1,
"currentItemFontSize": 20,
"currentItemLinearStrokeSharpness": "round",
"currentItemOpacity": 100,
"currentItemRoughness": 1,
+ "currentItemStartArrowhead": null,
"currentItemStrokeColor": "#000000",
"currentItemStrokeSharpness": "sharp",
"currentItemStrokeStyle": "solid",
@@ -461,17 +459,15 @@ exports[`given element A and group of elements B and given both are selected whe
Object {
"appearance": "light",
"collaborators": Map {},
- "currentItemArrowheads": Object {
- "end": "arrow",
- "start": null,
- },
"currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
"currentItemFillStyle": "hachure",
"currentItemFontFamily": 1,
"currentItemFontSize": 20,
"currentItemLinearStrokeSharpness": "round",
"currentItemOpacity": 100,
"currentItemRoughness": 1,
+ "currentItemStartArrowhead": null,
"currentItemStrokeColor": "#000000",
"currentItemStrokeSharpness": "sharp",
"currentItemStrokeStyle": "solid",
@@ -924,17 +920,15 @@ exports[`regression tests Cmd/Ctrl-click exclusively select element under pointe
Object {
"appearance": "light",
"collaborators": Map {},
- "currentItemArrowheads": Object {
- "end": "arrow",
- "start": null,
- },
"currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
"currentItemFillStyle": "hachure",
"currentItemFontFamily": 1,
"currentItemFontSize": 20,
"currentItemLinearStrokeSharpness": "round",
"currentItemOpacity": 100,
"currentItemRoughness": 1,
+ "currentItemStartArrowhead": null,
"currentItemStrokeColor": "#000000",
"currentItemStrokeSharpness": "sharp",
"currentItemStrokeStyle": "solid",
@@ -1696,17 +1690,15 @@ exports[`regression tests Drags selected element when hitting only bounding box
Object {
"appearance": "light",
"collaborators": Map {},
- "currentItemArrowheads": Object {
- "end": "arrow",
- "start": null,
- },
"currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
"currentItemFillStyle": "hachure",
"currentItemFontFamily": 1,
"currentItemFontSize": 20,
"currentItemLinearStrokeSharpness": "round",
"currentItemOpacity": 100,
"currentItemRoughness": 1,
+ "currentItemStartArrowhead": null,
"currentItemStrokeColor": "#000000",
"currentItemStrokeSharpness": "sharp",
"currentItemStrokeStyle": "solid",
@@ -1896,17 +1888,15 @@ exports[`regression tests adjusts z order when grouping: [end of test] appState
Object {
"appearance": "light",
"collaborators": Map {},
- "currentItemArrowheads": Object {
- "end": "arrow",
- "start": null,
- },
"currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
"currentItemFillStyle": "hachure",
"currentItemFontFamily": 1,
"currentItemFontSize": 20,
"currentItemLinearStrokeSharpness": "round",
"currentItemOpacity": 100,
"currentItemRoughness": 1,
+ "currentItemStartArrowhead": null,
"currentItemStrokeColor": "#000000",
"currentItemStrokeSharpness": "sharp",
"currentItemStrokeStyle": "solid",
@@ -2350,17 +2340,15 @@ exports[`regression tests alt-drag duplicates an element: [end of test] appState
Object {
"appearance": "light",
"collaborators": Map {},
- "currentItemArrowheads": Object {
- "end": "arrow",
- "start": null,
- },
"currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
"currentItemFillStyle": "hachure",
"currentItemFontFamily": 1,
"currentItemFontSize": 20,
"currentItemLinearStrokeSharpness": "round",
"currentItemOpacity": 100,
"currentItemRoughness": 1,
+ "currentItemStartArrowhead": null,
"currentItemStrokeColor": "#000000",
"currentItemStrokeSharpness": "sharp",
"currentItemStrokeStyle": "solid",
@@ -2599,17 +2587,15 @@ exports[`regression tests arrow keys: [end of test] appState 1`] = `
Object {
"appearance": "light",
"collaborators": Map {},
- "currentItemArrowheads": Object {
- "end": "arrow",
- "start": null,
- },
"currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
"currentItemFillStyle": "hachure",
"currentItemFontFamily": 1,
"currentItemFontSize": 20,
"currentItemLinearStrokeSharpness": "round",
"currentItemOpacity": 100,
"currentItemRoughness": 1,
+ "currentItemStartArrowhead": null,
"currentItemStrokeColor": "#000000",
"currentItemStrokeSharpness": "sharp",
"currentItemStrokeStyle": "solid",
@@ -2759,17 +2745,15 @@ exports[`regression tests can drag element that covers another element, while an
Object {
"appearance": "light",
"collaborators": Map {},
- "currentItemArrowheads": Object {
- "end": "arrow",
- "start": null,
- },
"currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
"currentItemFillStyle": "hachure",
"currentItemFontFamily": 1,
"currentItemFontSize": 20,
"currentItemLinearStrokeSharpness": "round",
"currentItemOpacity": 100,
"currentItemRoughness": 1,
+ "currentItemStartArrowhead": null,
"currentItemStrokeColor": "#000000",
"currentItemStrokeSharpness": "sharp",
"currentItemStrokeStyle": "solid",
@@ -3232,17 +3216,15 @@ exports[`regression tests change the properties of a shape: [end of test] appSta
Object {
"appearance": "light",
"collaborators": Map {},
- "currentItemArrowheads": Object {
- "end": "arrow",
- "start": null,
- },
"currentItemBackgroundColor": "#fa5252",
+ "currentItemEndArrowhead": "arrow",
"currentItemFillStyle": "hachure",
"currentItemFontFamily": 1,
"currentItemFontSize": 20,
"currentItemLinearStrokeSharpness": "round",
"currentItemOpacity": 100,
"currentItemRoughness": 1,
+ "currentItemStartArrowhead": null,
"currentItemStrokeColor": "#5f3dc4",
"currentItemStrokeSharpness": "sharp",
"currentItemStrokeStyle": "solid",
@@ -3536,17 +3518,15 @@ exports[`regression tests click on an element and drag it: [dragged] appState 1`
Object {
"appearance": "light",
"collaborators": Map {},
- "currentItemArrowheads": Object {
- "end": "arrow",
- "start": null,
- },
"currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
"currentItemFillStyle": "hachure",
"currentItemFontFamily": 1,
"currentItemFontSize": 20,
"currentItemLinearStrokeSharpness": "round",
"currentItemOpacity": 100,
"currentItemRoughness": 1,
+ "currentItemStartArrowhead": null,
"currentItemStrokeColor": "#000000",
"currentItemStrokeSharpness": "sharp",
"currentItemStrokeStyle": "solid",
@@ -3736,17 +3716,15 @@ exports[`regression tests click on an element and drag it: [end of test] appStat
Object {
"appearance": "light",
"collaborators": Map {},
- "currentItemArrowheads": Object {
- "end": "arrow",
- "start": null,
- },
"currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
"currentItemFillStyle": "hachure",
"currentItemFontFamily": 1,
"currentItemFontSize": 20,
"currentItemLinearStrokeSharpness": "round",
"currentItemOpacity": 100,
"currentItemRoughness": 1,
+ "currentItemStartArrowhead": null,
"currentItemStrokeColor": "#000000",
"currentItemStrokeSharpness": "sharp",
"currentItemStrokeStyle": "solid",
@@ -3976,17 +3954,15 @@ exports[`regression tests click to select a shape: [end of test] appState 1`] =
Object {
"appearance": "light",
"collaborators": Map {},
- "currentItemArrowheads": Object {
- "end": "arrow",
- "start": null,
- },
"currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
"currentItemFillStyle": "hachure",
"currentItemFontFamily": 1,
"currentItemFontSize": 20,
"currentItemLinearStrokeSharpness": "round",
"currentItemOpacity": 100,
"currentItemRoughness": 1,
+ "currentItemStartArrowhead": null,
"currentItemStrokeColor": "#000000",
"currentItemStrokeSharpness": "sharp",
"currentItemStrokeStyle": "solid",
@@ -4224,17 +4200,15 @@ exports[`regression tests click-drag to select a group: [end of test] appState 1
Object {
"appearance": "light",
"collaborators": Map {},
- "currentItemArrowheads": Object {
- "end": "arrow",
- "start": null,
- },
"currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
"currentItemFillStyle": "hachure",
"currentItemFontFamily": 1,
"currentItemFontSize": 20,
"currentItemLinearStrokeSharpness": "round",
"currentItemOpacity": 100,
"currentItemRoughness": 1,
+ "currentItemStartArrowhead": null,
"currentItemStrokeColor": "#000000",
"currentItemStrokeSharpness": "sharp",
"currentItemStrokeStyle": "solid",
@@ -4581,17 +4555,15 @@ exports[`regression tests deselects group of selected elements on pointer down w
Object {
"appearance": "light",
"collaborators": Map {},
- "currentItemArrowheads": Object {
- "end": "arrow",
- "start": null,
- },
"currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
"currentItemFillStyle": "hachure",
"currentItemFontFamily": 1,
"currentItemFontSize": 20,
"currentItemLinearStrokeSharpness": "round",
"currentItemOpacity": 100,
"currentItemRoughness": 1,
+ "currentItemStartArrowhead": null,
"currentItemStrokeColor": "#000000",
"currentItemStrokeSharpness": "sharp",
"currentItemStrokeStyle": "solid",
@@ -4872,17 +4844,15 @@ exports[`regression tests deselects group of selected elements on pointer up whe
Object {
"appearance": "light",
"collaborators": Map {},
- "currentItemArrowheads": Object {
- "end": "arrow",
- "start": null,
- },
"currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
"currentItemFillStyle": "hachure",
"currentItemFontFamily": 1,
"currentItemFontSize": 20,
"currentItemLinearStrokeSharpness": "round",
"currentItemOpacity": 100,
"currentItemRoughness": 1,
+ "currentItemStartArrowhead": null,
"currentItemStrokeColor": "#000000",
"currentItemStrokeSharpness": "sharp",
"currentItemStrokeStyle": "solid",
@@ -5175,17 +5145,15 @@ exports[`regression tests deselects selected element on pointer down when pointe
Object {
"appearance": "light",
"collaborators": Map {},
- "currentItemArrowheads": Object {
- "end": "arrow",
- "start": null,
- },
"currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
"currentItemFillStyle": "hachure",
"currentItemFontFamily": 1,
"currentItemFontSize": 20,
"currentItemLinearStrokeSharpness": "round",
"currentItemOpacity": 100,
"currentItemRoughness": 1,
+ "currentItemStartArrowhead": null,
"currentItemStrokeColor": "#000000",
"currentItemStrokeSharpness": "sharp",
"currentItemStrokeStyle": "solid",
@@ -5379,17 +5347,15 @@ exports[`regression tests deselects selected element, on pointer up, when click
Object {
"appearance": "light",
"collaborators": Map {},
- "currentItemArrowheads": Object {
- "end": "arrow",
- "start": null,
- },
"currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
"currentItemFillStyle": "hachure",
"currentItemFontFamily": 1,
"currentItemFontSize": 20,
"currentItemLinearStrokeSharpness": "round",
"currentItemOpacity": 100,
"currentItemRoughness": 1,
+ "currentItemStartArrowhead": null,
"currentItemStrokeColor": "#000000",
"currentItemStrokeSharpness": "sharp",
"currentItemStrokeStyle": "solid",
@@ -5561,17 +5527,15 @@ exports[`regression tests double click to edit a group: [end of test] appState 1
Object {
"appearance": "light",
"collaborators": Map {},
- "currentItemArrowheads": Object {
- "end": "arrow",
- "start": null,
- },
"currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
"currentItemFillStyle": "hachure",
"currentItemFontFamily": 1,
"currentItemFontSize": 20,
"currentItemLinearStrokeSharpness": "round",
"currentItemOpacity": 100,
"currentItemRoughness": 1,
+ "currentItemStartArrowhead": null,
"currentItemStrokeColor": "#000000",
"currentItemStrokeSharpness": "sharp",
"currentItemStrokeStyle": "solid",
@@ -6010,17 +5974,15 @@ exports[`regression tests drags selected elements from point inside common bound
Object {
"appearance": "light",
"collaborators": Map {},
- "currentItemArrowheads": Object {
- "end": "arrow",
- "start": null,
- },
"currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
"currentItemFillStyle": "hachure",
"currentItemFontFamily": 1,
"currentItemFontSize": 20,
"currentItemLinearStrokeSharpness": "round",
"currentItemOpacity": 100,
"currentItemRoughness": 1,
+ "currentItemStartArrowhead": null,
"currentItemStrokeColor": "#000000",
"currentItemStrokeSharpness": "sharp",
"currentItemStrokeStyle": "solid",
@@ -6324,17 +6286,15 @@ exports[`regression tests draw every type of shape: [end of test] appState 1`] =
Object {
"appearance": "light",
"collaborators": Map {},
- "currentItemArrowheads": Object {
- "end": "arrow",
- "start": null,
- },
"currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
"currentItemFillStyle": "hachure",
"currentItemFontFamily": 1,
"currentItemFontSize": 20,
"currentItemLinearStrokeSharpness": "round",
"currentItemOpacity": 100,
"currentItemRoughness": 1,
+ "currentItemStartArrowhead": null,
"currentItemStrokeColor": "#000000",
"currentItemStrokeSharpness": "sharp",
"currentItemStrokeStyle": "solid",
@@ -8354,17 +8314,15 @@ exports[`regression tests given a group of selected elements with an element tha
Object {
"appearance": "light",
"collaborators": Map {},
- "currentItemArrowheads": Object {
- "end": "arrow",
- "start": null,
- },
"currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
"currentItemFillStyle": "hachure",
"currentItemFontFamily": 1,
"currentItemFontSize": 20,
"currentItemLinearStrokeSharpness": "round",
"currentItemOpacity": 100,
"currentItemRoughness": 1,
+ "currentItemStartArrowhead": null,
"currentItemStrokeColor": "#000000",
"currentItemStrokeSharpness": "sharp",
"currentItemStrokeStyle": "solid",
@@ -8712,17 +8670,15 @@ exports[`regression tests given a selected element A and a not selected element
Object {
"appearance": "light",
"collaborators": Map {},
- "currentItemArrowheads": Object {
- "end": "arrow",
- "start": null,
- },
"currentItemBackgroundColor": "#fa5252",
+ "currentItemEndArrowhead": "arrow",
"currentItemFillStyle": "hachure",
"currentItemFontFamily": 1,
"currentItemFontSize": 20,
"currentItemLinearStrokeSharpness": "round",
"currentItemOpacity": 100,
"currentItemRoughness": 1,
+ "currentItemStartArrowhead": null,
"currentItemStrokeColor": "#000000",
"currentItemStrokeSharpness": "sharp",
"currentItemStrokeStyle": "solid",
@@ -8963,17 +8919,15 @@ exports[`regression tests given selected element A with lower z-index than unsel
Object {
"appearance": "light",
"collaborators": Map {},
- "currentItemArrowheads": Object {
- "end": "arrow",
- "start": null,
- },
"currentItemBackgroundColor": "#fa5252",
+ "currentItemEndArrowhead": "arrow",
"currentItemFillStyle": "hachure",
"currentItemFontFamily": 1,
"currentItemFontSize": 20,
"currentItemLinearStrokeSharpness": "round",
"currentItemOpacity": 100,
"currentItemRoughness": 1,
+ "currentItemStartArrowhead": null,
"currentItemStrokeColor": "#000000",
"currentItemStrokeSharpness": "sharp",
"currentItemStrokeStyle": "solid",
@@ -9212,17 +9166,15 @@ exports[`regression tests given selected element A with lower z-index than unsel
Object {
"appearance": "light",
"collaborators": Map {},
- "currentItemArrowheads": Object {
- "end": "arrow",
- "start": null,
- },
"currentItemBackgroundColor": "#fa5252",
+ "currentItemEndArrowhead": "arrow",
"currentItemFillStyle": "hachure",
"currentItemFontFamily": 1,
"currentItemFontSize": 20,
"currentItemLinearStrokeSharpness": "round",
"currentItemOpacity": 100,
"currentItemRoughness": 1,
+ "currentItemStartArrowhead": null,
"currentItemStrokeColor": "#000000",
"currentItemStrokeSharpness": "sharp",
"currentItemStrokeStyle": "solid",
@@ -9523,17 +9475,15 @@ exports[`regression tests key 2 selects rectangle tool: [end of test] appState 1
Object {
"appearance": "light",
"collaborators": Map {},
- "currentItemArrowheads": Object {
- "end": "arrow",
- "start": null,
- },
"currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
"currentItemFillStyle": "hachure",
"currentItemFontFamily": 1,
"currentItemFontSize": 20,
"currentItemLinearStrokeSharpness": "round",
"currentItemOpacity": 100,
"currentItemRoughness": 1,
+ "currentItemStartArrowhead": null,
"currentItemStrokeColor": "#000000",
"currentItemStrokeSharpness": "sharp",
"currentItemStrokeStyle": "solid",
@@ -9683,17 +9633,15 @@ exports[`regression tests key 3 selects diamond tool: [end of test] appState 1`]
Object {
"appearance": "light",
"collaborators": Map {},
- "currentItemArrowheads": Object {
- "end": "arrow",
- "start": null,
- },
"currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
"currentItemFillStyle": "hachure",
"currentItemFontFamily": 1,
"currentItemFontSize": 20,
"currentItemLinearStrokeSharpness": "round",
"currentItemOpacity": 100,
"currentItemRoughness": 1,
+ "currentItemStartArrowhead": null,
"currentItemStrokeColor": "#000000",
"currentItemStrokeSharpness": "sharp",
"currentItemStrokeStyle": "solid",
@@ -9843,17 +9791,15 @@ exports[`regression tests key 4 selects ellipse tool: [end of test] appState 1`]
Object {
"appearance": "light",
"collaborators": Map {},
- "currentItemArrowheads": Object {
- "end": "arrow",
- "start": null,
- },
"currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
"currentItemFillStyle": "hachure",
"currentItemFontFamily": 1,
"currentItemFontSize": 20,
"currentItemLinearStrokeSharpness": "round",
"currentItemOpacity": 100,
"currentItemRoughness": 1,
+ "currentItemStartArrowhead": null,
"currentItemStrokeColor": "#000000",
"currentItemStrokeSharpness": "sharp",
"currentItemStrokeStyle": "solid",
@@ -10003,17 +9949,15 @@ exports[`regression tests key 5 selects arrow tool: [end of test] appState 1`] =
Object {
"appearance": "light",
"collaborators": Map {},
- "currentItemArrowheads": Object {
- "end": "arrow",
- "start": null,
- },
"currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
"currentItemFillStyle": "hachure",
"currentItemFontFamily": 1,
"currentItemFontSize": 20,
"currentItemLinearStrokeSharpness": "round",
"currentItemOpacity": 100,
"currentItemRoughness": 1,
+ "currentItemStartArrowhead": null,
"currentItemStrokeColor": "#000000",
"currentItemStrokeSharpness": "sharp",
"currentItemStrokeStyle": "solid",
@@ -10193,17 +10137,15 @@ exports[`regression tests key 6 selects line tool: [end of test] appState 1`] =
Object {
"appearance": "light",
"collaborators": Map {},
- "currentItemArrowheads": Object {
- "end": "arrow",
- "start": null,
- },
"currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
"currentItemFillStyle": "hachure",
"currentItemFontFamily": 1,
"currentItemFontSize": 20,
"currentItemLinearStrokeSharpness": "round",
"currentItemOpacity": 100,
"currentItemRoughness": 1,
+ "currentItemStartArrowhead": null,
"currentItemStrokeColor": "#000000",
"currentItemStrokeSharpness": "sharp",
"currentItemStrokeStyle": "solid",
@@ -10383,17 +10325,15 @@ exports[`regression tests key 7 selects draw tool: [end of test] appState 1`] =
Object {
"appearance": "light",
"collaborators": Map {},
- "currentItemArrowheads": Object {
- "end": "arrow",
- "start": null,
- },
"currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
"currentItemFillStyle": "hachure",
"currentItemFontFamily": 1,
"currentItemFontSize": 20,
"currentItemLinearStrokeSharpness": "round",
"currentItemOpacity": 100,
"currentItemRoughness": 1,
+ "currentItemStartArrowhead": null,
"currentItemStrokeColor": "#000000",
"currentItemStrokeSharpness": "sharp",
"currentItemStrokeStyle": "solid",
@@ -10573,17 +10513,15 @@ exports[`regression tests key a selects arrow tool: [end of test] appState 1`] =
Object {
"appearance": "light",
"collaborators": Map {},
- "currentItemArrowheads": Object {
- "end": "arrow",
- "start": null,
- },
"currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
"currentItemFillStyle": "hachure",
"currentItemFontFamily": 1,
"currentItemFontSize": 20,
"currentItemLinearStrokeSharpness": "round",
"currentItemOpacity": 100,
"currentItemRoughness": 1,
+ "currentItemStartArrowhead": null,
"currentItemStrokeColor": "#000000",
"currentItemStrokeSharpness": "sharp",
"currentItemStrokeStyle": "solid",
@@ -10763,17 +10701,15 @@ exports[`regression tests key d selects diamond tool: [end of test] appState 1`]
Object {
"appearance": "light",
"collaborators": Map {},
- "currentItemArrowheads": Object {
- "end": "arrow",
- "start": null,
- },
"currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
"currentItemFillStyle": "hachure",
"currentItemFontFamily": 1,
"currentItemFontSize": 20,
"currentItemLinearStrokeSharpness": "round",
"currentItemOpacity": 100,
"currentItemRoughness": 1,
+ "currentItemStartArrowhead": null,
"currentItemStrokeColor": "#000000",
"currentItemStrokeSharpness": "sharp",
"currentItemStrokeStyle": "solid",
@@ -10923,17 +10859,15 @@ exports[`regression tests key e selects ellipse tool: [end of test] appState 1`]
Object {
"appearance": "light",
"collaborators": Map {},
- "currentItemArrowheads": Object {
- "end": "arrow",
- "start": null,
- },
"currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
"currentItemFillStyle": "hachure",
"currentItemFontFamily": 1,
"currentItemFontSize": 20,
"currentItemLinearStrokeSharpness": "round",
"currentItemOpacity": 100,
"currentItemRoughness": 1,
+ "currentItemStartArrowhead": null,
"currentItemStrokeColor": "#000000",
"currentItemStrokeSharpness": "sharp",
"currentItemStrokeStyle": "solid",
@@ -11083,17 +11017,15 @@ exports[`regression tests key l selects line tool: [end of test] appState 1`] =
Object {
"appearance": "light",
"collaborators": Map {},
- "currentItemArrowheads": Object {
- "end": "arrow",
- "start": null,
- },
"currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
"currentItemFillStyle": "hachure",
"currentItemFontFamily": 1,
"currentItemFontSize": 20,
"currentItemLinearStrokeSharpness": "round",
"currentItemOpacity": 100,
"currentItemRoughness": 1,
+ "currentItemStartArrowhead": null,
"currentItemStrokeColor": "#000000",
"currentItemStrokeSharpness": "sharp",
"currentItemStrokeStyle": "solid",
@@ -11273,17 +11205,15 @@ exports[`regression tests key r selects rectangle tool: [end of test] appState 1
Object {
"appearance": "light",
"collaborators": Map {},
- "currentItemArrowheads": Object {
- "end": "arrow",
- "start": null,
- },
"currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
"currentItemFillStyle": "hachure",
"currentItemFontFamily": 1,
"currentItemFontSize": 20,
"currentItemLinearStrokeSharpness": "round",
"currentItemOpacity": 100,
"currentItemRoughness": 1,
+ "currentItemStartArrowhead": null,
"currentItemStrokeColor": "#000000",
"currentItemStrokeSharpness": "sharp",
"currentItemStrokeStyle": "solid",
@@ -11433,17 +11363,15 @@ exports[`regression tests key x selects draw tool: [end of test] appState 1`] =
Object {
"appearance": "light",
"collaborators": Map {},
- "currentItemArrowheads": Object {
- "end": "arrow",
- "start": null,
- },
"currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
"currentItemFillStyle": "hachure",
"currentItemFontFamily": 1,
"currentItemFontSize": 20,
"currentItemLinearStrokeSharpness": "round",
"currentItemOpacity": 100,
"currentItemRoughness": 1,
+ "currentItemStartArrowhead": null,
"currentItemStrokeColor": "#000000",
"currentItemStrokeSharpness": "sharp",
"currentItemStrokeStyle": "solid",
@@ -11623,17 +11551,15 @@ exports[`regression tests make a group and duplicate it: [end of test] appState
Object {
"appearance": "light",
"collaborators": Map {},
- "currentItemArrowheads": Object {
- "end": "arrow",
- "start": null,
- },
"currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
"currentItemFillStyle": "hachure",
"currentItemFontFamily": 1,
"currentItemFontSize": 20,
"currentItemLinearStrokeSharpness": "round",
"currentItemOpacity": 100,
"currentItemRoughness": 1,
+ "currentItemStartArrowhead": null,
"currentItemStrokeColor": "#000000",
"currentItemStrokeSharpness": "sharp",
"currentItemStrokeStyle": "solid",
@@ -12335,17 +12261,15 @@ exports[`regression tests noop interaction after undo shouldn't create history e
Object {
"appearance": "light",
"collaborators": Map {},
- "currentItemArrowheads": Object {
- "end": "arrow",
- "start": null,
- },
"currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
"currentItemFillStyle": "hachure",
"currentItemFontFamily": 1,
"currentItemFontSize": 20,
"currentItemLinearStrokeSharpness": "round",
"currentItemOpacity": 100,
"currentItemRoughness": 1,
+ "currentItemStartArrowhead": null,
"currentItemStrokeColor": "#000000",
"currentItemStrokeSharpness": "sharp",
"currentItemStrokeStyle": "solid",
@@ -12584,17 +12508,15 @@ exports[`regression tests pinch-to-zoom works: [end of test] appState 1`] = `
Object {
"appearance": "light",
"collaborators": Map {},
- "currentItemArrowheads": Object {
- "end": "arrow",
- "start": null,
- },
"currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
"currentItemFillStyle": "hachure",
"currentItemFontFamily": 1,
"currentItemFontSize": 20,
"currentItemLinearStrokeSharpness": "round",
"currentItemOpacity": 100,
"currentItemRoughness": 1,
+ "currentItemStartArrowhead": null,
"currentItemStrokeColor": "#000000",
"currentItemStrokeSharpness": "sharp",
"currentItemStrokeStyle": "solid",
@@ -12682,17 +12604,15 @@ exports[`regression tests rerenders UI on language change: [end of test] appStat
Object {
"appearance": "light",
"collaborators": Map {},
- "currentItemArrowheads": Object {
- "end": "arrow",
- "start": null,
- },
"currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
"currentItemFillStyle": "hachure",
"currentItemFontFamily": 1,
"currentItemFontSize": 20,
"currentItemLinearStrokeSharpness": "round",
"currentItemOpacity": 100,
"currentItemRoughness": 1,
+ "currentItemStartArrowhead": null,
"currentItemStrokeColor": "#000000",
"currentItemStrokeSharpness": "sharp",
"currentItemStrokeStyle": "solid",
@@ -12778,17 +12698,15 @@ exports[`regression tests selecting 'Add to library' in context menu adds elemen
Object {
"appearance": "light",
"collaborators": Map {},
- "currentItemArrowheads": Object {
- "end": "arrow",
- "start": null,
- },
"currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
"currentItemFillStyle": "hachure",
"currentItemFontFamily": 1,
"currentItemFontSize": 20,
"currentItemLinearStrokeSharpness": "round",
"currentItemOpacity": 100,
"currentItemRoughness": 1,
+ "currentItemStartArrowhead": null,
"currentItemStrokeColor": "#000000",
"currentItemStrokeSharpness": "sharp",
"currentItemStrokeStyle": "solid",
@@ -12938,17 +12856,15 @@ exports[`regression tests selecting 'Bring forward' in context menu brings eleme
Object {
"appearance": "light",
"collaborators": Map {},
- "currentItemArrowheads": Object {
- "end": "arrow",
- "start": null,
- },
"currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
"currentItemFillStyle": "hachure",
"currentItemFontFamily": 1,
"currentItemFontSize": 20,
"currentItemLinearStrokeSharpness": "round",
"currentItemOpacity": 100,
"currentItemRoughness": 1,
+ "currentItemStartArrowhead": null,
"currentItemStrokeColor": "#000000",
"currentItemStrokeSharpness": "sharp",
"currentItemStrokeStyle": "solid",
@@ -13242,17 +13158,15 @@ exports[`regression tests selecting 'Bring to front' in context menu brings elem
Object {
"appearance": "light",
"collaborators": Map {},
- "currentItemArrowheads": Object {
- "end": "arrow",
- "start": null,
- },
"currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
"currentItemFillStyle": "hachure",
"currentItemFontFamily": 1,
"currentItemFontSize": 20,
"currentItemLinearStrokeSharpness": "round",
"currentItemOpacity": 100,
"currentItemRoughness": 1,
+ "currentItemStartArrowhead": null,
"currentItemStrokeColor": "#000000",
"currentItemStrokeSharpness": "sharp",
"currentItemStrokeStyle": "solid",
@@ -13546,17 +13460,15 @@ exports[`regression tests selecting 'Copy styles' in context menu copies styles:
Object {
"appearance": "light",
"collaborators": Map {},
- "currentItemArrowheads": Object {
- "end": "arrow",
- "start": null,
- },
"currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
"currentItemFillStyle": "hachure",
"currentItemFontFamily": 1,
"currentItemFontSize": 20,
"currentItemLinearStrokeSharpness": "round",
"currentItemOpacity": 100,
"currentItemRoughness": 1,
+ "currentItemStartArrowhead": null,
"currentItemStrokeColor": "#000000",
"currentItemStrokeSharpness": "sharp",
"currentItemStrokeStyle": "solid",
@@ -13706,17 +13618,15 @@ exports[`regression tests selecting 'Delete' in context menu deletes element: [e
Object {
"appearance": "light",
"collaborators": Map {},
- "currentItemArrowheads": Object {
- "end": "arrow",
- "start": null,
- },
"currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
"currentItemFillStyle": "hachure",
"currentItemFontFamily": 1,
"currentItemFontSize": 20,
"currentItemLinearStrokeSharpness": "round",
"currentItemOpacity": 100,
"currentItemRoughness": 1,
+ "currentItemStartArrowhead": null,
"currentItemStrokeColor": "#000000",
"currentItemStrokeSharpness": "sharp",
"currentItemStrokeStyle": "solid",
@@ -13898,17 +13808,15 @@ exports[`regression tests selecting 'Duplicate' in context menu duplicates eleme
Object {
"appearance": "light",
"collaborators": Map {},
- "currentItemArrowheads": Object {
- "end": "arrow",
- "start": null,
- },
"currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
"currentItemFillStyle": "hachure",
"currentItemFontFamily": 1,
"currentItemFontSize": 20,
"currentItemLinearStrokeSharpness": "round",
"currentItemOpacity": 100,
"currentItemRoughness": 1,
+ "currentItemStartArrowhead": null,
"currentItemStrokeColor": "#000000",
"currentItemStrokeSharpness": "sharp",
"currentItemStrokeStyle": "solid",
@@ -14143,17 +14051,15 @@ exports[`regression tests selecting 'Group selection' in context menu groups sel
Object {
"appearance": "light",
"collaborators": Map {},
- "currentItemArrowheads": Object {
- "end": "arrow",
- "start": null,
- },
"currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
"currentItemFillStyle": "hachure",
"currentItemFontFamily": 1,
"currentItemFontSize": 20,
"currentItemLinearStrokeSharpness": "round",
"currentItemOpacity": 100,
"currentItemRoughness": 1,
+ "currentItemStartArrowhead": null,
"currentItemStrokeColor": "#000000",
"currentItemStrokeSharpness": "sharp",
"currentItemStrokeStyle": "solid",
@@ -14463,17 +14369,15 @@ exports[`regression tests selecting 'Paste styles' in context menu pastes styles
Object {
"appearance": "light",
"collaborators": Map {},
- "currentItemArrowheads": Object {
- "end": "arrow",
- "start": null,
- },
"currentItemBackgroundColor": "#e64980",
+ "currentItemEndArrowhead": "arrow",
"currentItemFillStyle": "cross-hatch",
"currentItemFontFamily": 1,
"currentItemFontSize": 20,
"currentItemLinearStrokeSharpness": "round",
"currentItemOpacity": 60,
"currentItemRoughness": 2,
+ "currentItemStartArrowhead": null,
"currentItemStrokeColor": "#c92a2a",
"currentItemStrokeSharpness": "sharp",
"currentItemStrokeStyle": "dotted",
@@ -15298,17 +15202,15 @@ exports[`regression tests selecting 'Send backward' in context menu sends elemen
Object {
"appearance": "light",
"collaborators": Map {},
- "currentItemArrowheads": Object {
- "end": "arrow",
- "start": null,
- },
"currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
"currentItemFillStyle": "hachure",
"currentItemFontFamily": 1,
"currentItemFontSize": 20,
"currentItemLinearStrokeSharpness": "round",
"currentItemOpacity": 100,
"currentItemRoughness": 1,
+ "currentItemStartArrowhead": null,
"currentItemStrokeColor": "#000000",
"currentItemStrokeSharpness": "sharp",
"currentItemStrokeStyle": "solid",
@@ -15602,17 +15504,15 @@ exports[`regression tests selecting 'Send to back' in context menu sends element
Object {
"appearance": "light",
"collaborators": Map {},
- "currentItemArrowheads": Object {
- "end": "arrow",
- "start": null,
- },
"currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
"currentItemFillStyle": "hachure",
"currentItemFontFamily": 1,
"currentItemFontSize": 20,
"currentItemLinearStrokeSharpness": "round",
"currentItemOpacity": 100,
"currentItemRoughness": 1,
+ "currentItemStartArrowhead": null,
"currentItemStrokeColor": "#000000",
"currentItemStrokeSharpness": "sharp",
"currentItemStrokeStyle": "solid",
@@ -15906,17 +15806,15 @@ exports[`regression tests selecting 'Ungroup selection' in context menu ungroups
Object {
"appearance": "light",
"collaborators": Map {},
- "currentItemArrowheads": Object {
- "end": "arrow",
- "start": null,
- },
"currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
"currentItemFillStyle": "hachure",
"currentItemFontFamily": 1,
"currentItemFontSize": 20,
"currentItemLinearStrokeSharpness": "round",
"currentItemOpacity": 100,
"currentItemRoughness": 1,
+ "currentItemStartArrowhead": null,
"currentItemStrokeColor": "#000000",
"currentItemStrokeSharpness": "sharp",
"currentItemStrokeStyle": "solid",
@@ -16281,17 +16179,15 @@ exports[`regression tests shift click on selected element should deselect it on
Object {
"appearance": "light",
"collaborators": Map {},
- "currentItemArrowheads": Object {
- "end": "arrow",
- "start": null,
- },
"currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
"currentItemFillStyle": "hachure",
"currentItemFontFamily": 1,
"currentItemFontSize": 20,
"currentItemLinearStrokeSharpness": "round",
"currentItemOpacity": 100,
"currentItemRoughness": 1,
+ "currentItemStartArrowhead": null,
"currentItemStrokeColor": "#000000",
"currentItemStrokeSharpness": "sharp",
"currentItemStrokeStyle": "solid",
@@ -16444,17 +16340,15 @@ exports[`regression tests shift-click to multiselect, then drag: [end of test] a
Object {
"appearance": "light",
"collaborators": Map {},
- "currentItemArrowheads": Object {
- "end": "arrow",
- "start": null,
- },
"currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
"currentItemFillStyle": "hachure",
"currentItemFontFamily": 1,
"currentItemFontSize": 20,
"currentItemLinearStrokeSharpness": "round",
"currentItemOpacity": 100,
"currentItemRoughness": 1,
+ "currentItemStartArrowhead": null,
"currentItemStrokeColor": "#000000",
"currentItemStrokeSharpness": "sharp",
"currentItemStrokeStyle": "solid",
@@ -16761,17 +16655,15 @@ exports[`regression tests should show fill icons when element has non transparen
Object {
"appearance": "light",
"collaborators": Map {},
- "currentItemArrowheads": Object {
- "end": "arrow",
- "start": null,
- },
"currentItemBackgroundColor": "#fa5252",
+ "currentItemEndArrowhead": "arrow",
"currentItemFillStyle": "hachure",
"currentItemFontFamily": 1,
"currentItemFontSize": 20,
"currentItemLinearStrokeSharpness": "round",
"currentItemOpacity": 100,
"currentItemRoughness": 1,
+ "currentItemStartArrowhead": null,
"currentItemStrokeColor": "#000000",
"currentItemStrokeSharpness": "sharp",
"currentItemStrokeStyle": "solid",
@@ -16996,17 +16888,15 @@ exports[`regression tests shows 'Group selection' in context menu for multiple s
Object {
"appearance": "light",
"collaborators": Map {},
- "currentItemArrowheads": Object {
- "end": "arrow",
- "start": null,
- },
"currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
"currentItemFillStyle": "hachure",
"currentItemFontFamily": 1,
"currentItemFontSize": 20,
"currentItemLinearStrokeSharpness": "round",
"currentItemOpacity": 100,
"currentItemRoughness": 1,
+ "currentItemStartArrowhead": null,
"currentItemStrokeColor": "#000000",
"currentItemStrokeSharpness": "sharp",
"currentItemStrokeStyle": "solid",
@@ -17247,17 +17137,15 @@ exports[`regression tests shows 'Ungroup selection' in context menu for group in
Object {
"appearance": "light",
"collaborators": Map {},
- "currentItemArrowheads": Object {
- "end": "arrow",
- "start": null,
- },
"currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
"currentItemFillStyle": "hachure",
"currentItemFontFamily": 1,
"currentItemFontSize": 20,
"currentItemLinearStrokeSharpness": "round",
"currentItemOpacity": 100,
"currentItemRoughness": 1,
+ "currentItemStartArrowhead": null,
"currentItemStrokeColor": "#000000",
"currentItemStrokeSharpness": "sharp",
"currentItemStrokeStyle": "solid",
@@ -17570,17 +17458,15 @@ exports[`regression tests shows context menu for canvas: [end of test] appState
Object {
"appearance": "light",
"collaborators": Map {},
- "currentItemArrowheads": Object {
- "end": "arrow",
- "start": null,
- },
"currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
"currentItemFillStyle": "hachure",
"currentItemFontFamily": 1,
"currentItemFontSize": 20,
"currentItemLinearStrokeSharpness": "round",
"currentItemOpacity": 100,
"currentItemRoughness": 1,
+ "currentItemStartArrowhead": null,
"currentItemStrokeColor": "#000000",
"currentItemStrokeSharpness": "sharp",
"currentItemStrokeStyle": "solid",
@@ -17666,17 +17552,15 @@ exports[`regression tests shows context menu for element: [end of test] appState
Object {
"appearance": "light",
"collaborators": Map {},
- "currentItemArrowheads": Object {
- "end": "arrow",
- "start": null,
- },
"currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
"currentItemFillStyle": "hachure",
"currentItemFontFamily": 1,
"currentItemFontSize": 20,
"currentItemLinearStrokeSharpness": "round",
"currentItemOpacity": 100,
"currentItemRoughness": 1,
+ "currentItemStartArrowhead": null,
"currentItemStrokeColor": "#000000",
"currentItemStrokeSharpness": "sharp",
"currentItemStrokeStyle": "solid",
@@ -17826,17 +17710,15 @@ exports[`regression tests single-clicking on a subgroup of a selected group shou
Object {
"appearance": "light",
"collaborators": Map {},
- "currentItemArrowheads": Object {
- "end": "arrow",
- "start": null,
- },
"currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
"currentItemFillStyle": "hachure",
"currentItemFontFamily": 1,
"currentItemFontSize": 20,
"currentItemLinearStrokeSharpness": "round",
"currentItemOpacity": 100,
"currentItemRoughness": 1,
+ "currentItemStartArrowhead": null,
"currentItemStrokeColor": "#000000",
"currentItemStrokeSharpness": "sharp",
"currentItemStrokeStyle": "solid",
@@ -18643,17 +18525,15 @@ exports[`regression tests spacebar + drag scrolls the canvas: [end of test] appS
Object {
"appearance": "light",
"collaborators": Map {},
- "currentItemArrowheads": Object {
- "end": "arrow",
- "start": null,
- },
"currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
"currentItemFillStyle": "hachure",
"currentItemFontFamily": 1,
"currentItemFontSize": 20,
"currentItemLinearStrokeSharpness": "round",
"currentItemOpacity": 100,
"currentItemRoughness": 1,
+ "currentItemStartArrowhead": null,
"currentItemStrokeColor": "#000000",
"currentItemStrokeSharpness": "sharp",
"currentItemStrokeStyle": "solid",
@@ -18739,17 +18619,15 @@ exports[`regression tests supports nested groups: [end of test] appState 1`] = `
Object {
"appearance": "light",
"collaborators": Map {},
- "currentItemArrowheads": Object {
- "end": "arrow",
- "start": null,
- },
"currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
"currentItemFillStyle": "hachure",
"currentItemFontFamily": 1,
"currentItemFontSize": 20,
"currentItemLinearStrokeSharpness": "round",
"currentItemOpacity": 100,
"currentItemRoughness": 1,
+ "currentItemStartArrowhead": null,
"currentItemStrokeColor": "#000000",
"currentItemStrokeSharpness": "sharp",
"currentItemStrokeStyle": "solid",
@@ -19465,17 +19343,15 @@ exports[`regression tests switches from group of selected elements to another el
Object {
"appearance": "light",
"collaborators": Map {},
- "currentItemArrowheads": Object {
- "end": "arrow",
- "start": null,
- },
"currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
"currentItemFillStyle": "hachure",
"currentItemFontFamily": 1,
"currentItemFontSize": 20,
"currentItemLinearStrokeSharpness": "round",
"currentItemOpacity": 100,
"currentItemRoughness": 1,
+ "currentItemStartArrowhead": null,
"currentItemStrokeColor": "#000000",
"currentItemStrokeSharpness": "sharp",
"currentItemStrokeStyle": "solid",
@@ -19866,17 +19742,15 @@ exports[`regression tests switches selected element on pointer down: [end of tes
Object {
"appearance": "light",
"collaborators": Map {},
- "currentItemArrowheads": Object {
- "end": "arrow",
- "start": null,
- },
"currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
"currentItemFillStyle": "hachure",
"currentItemFontFamily": 1,
"currentItemFontSize": 20,
"currentItemLinearStrokeSharpness": "round",
"currentItemOpacity": 100,
"currentItemRoughness": 1,
+ "currentItemStartArrowhead": null,
"currentItemStrokeColor": "#000000",
"currentItemStrokeSharpness": "sharp",
"currentItemStrokeStyle": "solid",
@@ -20157,17 +20031,15 @@ exports[`regression tests two-finger scroll works: [end of test] appState 1`] =
Object {
"appearance": "light",
"collaborators": Map {},
- "currentItemArrowheads": Object {
- "end": "arrow",
- "start": null,
- },
"currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
"currentItemFillStyle": "hachure",
"currentItemFontFamily": 1,
"currentItemFontSize": 20,
"currentItemLinearStrokeSharpness": "round",
"currentItemOpacity": 100,
"currentItemRoughness": 1,
+ "currentItemStartArrowhead": null,
"currentItemStrokeColor": "#000000",
"currentItemStrokeSharpness": "sharp",
"currentItemStrokeStyle": "solid",
@@ -20255,17 +20127,15 @@ exports[`regression tests undo/redo drawing an element: [end of test] appState 1
Object {
"appearance": "light",
"collaborators": Map {},
- "currentItemArrowheads": Object {
- "end": "arrow",
- "start": null,
- },
"currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
"currentItemFillStyle": "hachure",
"currentItemFontFamily": 1,
"currentItemFontSize": 20,
"currentItemLinearStrokeSharpness": "round",
"currentItemOpacity": 100,
"currentItemRoughness": 1,
+ "currentItemStartArrowhead": null,
"currentItemStrokeColor": "#000000",
"currentItemStrokeSharpness": "sharp",
"currentItemStrokeStyle": "solid",
@@ -20749,17 +20619,15 @@ exports[`regression tests updates fontSize & fontFamily appState: [end of test]
Object {
"appearance": "light",
"collaborators": Map {},
- "currentItemArrowheads": Object {
- "end": "arrow",
- "start": null,
- },
"currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
"currentItemFillStyle": "hachure",
"currentItemFontFamily": 3,
"currentItemFontSize": 20,
"currentItemLinearStrokeSharpness": "round",
"currentItemOpacity": 100,
"currentItemRoughness": 1,
+ "currentItemStartArrowhead": null,
"currentItemStrokeColor": "#000000",
"currentItemStrokeSharpness": "sharp",
"currentItemStrokeStyle": "solid",
@@ -20845,17 +20713,15 @@ exports[`regression tests zoom hotkeys: [end of test] appState 1`] = `
Object {
"appearance": "light",
"collaborators": Map {},
- "currentItemArrowheads": Object {
- "end": "arrow",
- "start": null,
- },
"currentItemBackgroundColor": "transparent",
+ "currentItemEndArrowhead": "arrow",
"currentItemFillStyle": "hachure",
"currentItemFontFamily": 1,
"currentItemFontSize": 20,
"currentItemLinearStrokeSharpness": "round",
"currentItemOpacity": 100,
"currentItemRoughness": 1,
+ "currentItemStartArrowhead": null,
"currentItemStrokeColor": "#000000",
"currentItemStrokeSharpness": "sharp",
"currentItemStrokeStyle": "solid",
diff --git a/src/types.ts b/src/types.ts
index 81416102e1..785326d8cd 100644
--- a/src/types.ts
+++ b/src/types.ts
@@ -61,10 +61,8 @@ export type AppState = {
currentItemFontSize: number;
currentItemTextAlign: TextAlign;
currentItemStrokeSharpness: ExcalidrawElement["strokeSharpness"];
- currentItemArrowheads: {
- start: Arrowhead | null;
- end: Arrowhead | null;
- };
+ currentItemStartArrowhead: Arrowhead | null;
+ currentItemEndArrowhead: Arrowhead | null;
currentItemLinearStrokeSharpness: ExcalidrawElement["strokeSharpness"];
viewBackgroundColor: string;
scrollX: FlooredNumber;