mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
fix: binding text to non-bindable containers and not always preferring selection (#4655)
This commit is contained in:
parent
8e26d5b500
commit
6d0716eb6b
13 changed files with 336 additions and 85 deletions
|
@ -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" ||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue