2ad0716f3d
* fix style pasting * Update src/actions/actionStyles.ts
19 lines
485 B
TypeScript
19 lines
485 B
TypeScript
import { ExcalidrawElement, ExcalidrawTextElement } from "./types";
|
|
|
|
export function isTextElement(
|
|
element: ExcalidrawElement,
|
|
): 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"
|
|
);
|
|
}
|