fix: binding text to non-bindable containers and not always preferring selection (#4655)
This commit is contained in:
@ -8,6 +8,7 @@ import {
|
||||
InitializedExcalidrawImageElement,
|
||||
ExcalidrawImageElement,
|
||||
ExcalidrawTextElementWithContainer,
|
||||
ExcalidrawTextContainer,
|
||||
} from "./types";
|
||||
|
||||
export const isGenericElement = (
|
||||
@ -91,7 +92,9 @@ export const isBindableElement = (
|
||||
);
|
||||
};
|
||||
|
||||
export const isTextBindableContainer = (element: ExcalidrawElement | null) => {
|
||||
export const isTextBindableContainer = (
|
||||
element: ExcalidrawElement | null,
|
||||
): element is ExcalidrawTextContainer => {
|
||||
return (
|
||||
element != null &&
|
||||
(element.type === "rectangle" ||
|
||||
|
Reference in New Issue
Block a user