fix style pasting (#832)

* fix style pasting

* Update src/actions/actionStyles.ts
This commit is contained in:
Faustino Kialungila 2020-02-24 15:21:13 +01:00 committed by GitHub
parent fbab93baff
commit 2ad0716f3d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 20 additions and 2 deletions

View file

@ -5,3 +5,14 @@ export function isTextElement(
): element is ExcalidrawTextElement {
return element.type === "text";
}
export function isExcalidrawElement(element: any): boolean {
return (
element?.type === "text" ||
element?.type === "diamond" ||
element?.type === "rectangle" ||
element?.type === "ellipse" ||
element?.type === "arrow" ||
element?.type === "line"
);
}