feat: add triangle arrowhead (#4024)
Co-authored-by: ad1992 <aakansha1216@gmail.com> Co-authored-by: dwelle <luzar.david@gmail.com>
This commit is contained in:
@ -258,6 +258,7 @@ export const getArrowheadPoints = (
|
||||
arrow: 30,
|
||||
bar: 15,
|
||||
dot: 15,
|
||||
triangle: 15,
|
||||
}[arrowhead]; // pixels (will differ for each arrowhead)
|
||||
|
||||
let length = 0;
|
||||
@ -294,6 +295,7 @@ export const getArrowheadPoints = (
|
||||
const angle = {
|
||||
arrow: 20,
|
||||
bar: 90,
|
||||
triangle: 25,
|
||||
}[arrowhead]; // degrees
|
||||
|
||||
// Return points
|
||||
|
@ -129,7 +129,7 @@ export type PointBinding = {
|
||||
gap: number;
|
||||
};
|
||||
|
||||
export type Arrowhead = "arrow" | "bar" | "dot";
|
||||
export type Arrowhead = "arrow" | "bar" | "dot" | "triangle";
|
||||
|
||||
export type ExcalidrawLinearElement = _ExcalidrawElementBase &
|
||||
Readonly<{
|
||||
|
Reference in New Issue
Block a user