Add free draw mode (#1570)

This commit is contained in:
Kostas Bariotis 2020-05-12 20:10:11 +01:00 committed by GitHub
parent 36e0c439fb
commit 9ec43d2626
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
21 changed files with 344 additions and 49 deletions

View file

@ -14,7 +14,10 @@ export function isLinearElement(
element?: ExcalidrawElement | null,
): element is ExcalidrawLinearElement {
return (
element != null && (element.type === "arrow" || element.type === "line")
element != null &&
(element.type === "arrow" ||
element.type === "line" ||
element.type === "draw")
);
}
@ -25,6 +28,7 @@ export function isExcalidrawElement(element: any): boolean {
element?.type === "rectangle" ||
element?.type === "ellipse" ||
element?.type === "arrow" ||
element?.type === "draw" ||
element?.type === "line"
);
}