mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
Aligns arrowhead schemas (#2517)
This commit is contained in:
parent
9cf54041dc
commit
9cfe7b45e5
5 changed files with 156 additions and 287 deletions
|
@ -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 })}
|
||||
/>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue