Aligns arrowhead schemas (#2517)

This commit is contained in:
Steve Ruiz 2020-12-12 16:42:30 +00:00 committed by GitHub
parent 9cf54041dc
commit 9cfe7b45e5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 156 additions and 287 deletions

View file

@ -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 })}
/>