mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
fix hit testing for custom elements
This commit is contained in:
parent
8706277d14
commit
47498796e0
2 changed files with 13 additions and 1 deletions
|
@ -10,6 +10,7 @@ import {
|
|||
ExcalidrawImageElement,
|
||||
ExcalidrawTextElementWithContainer,
|
||||
ExcalidrawTextContainer,
|
||||
ExcalidrawCustomElement,
|
||||
} from "./types";
|
||||
|
||||
export const isGenericElement = (
|
||||
|
@ -133,3 +134,7 @@ export const isBoundToContainer = (
|
|||
element !== null && isTextElement(element) && element.containerId !== null
|
||||
);
|
||||
};
|
||||
|
||||
export const isCustomElement = (
|
||||
element: ExcalidrawElement,
|
||||
): element is ExcalidrawCustomElement => element && element.type === "custom";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue