mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
feat: Bind text to container if double clicked on filled shape or stroke (#6250)
* feat: bind text to container when clicked on filled shape or element stroke * Bind if double clicked on stroke as well * remove * specs * remove * shuffle * fix * back to normal
This commit is contained in:
parent
5acb99777a
commit
b9ba407f96
3 changed files with 77 additions and 11 deletions
|
@ -137,7 +137,7 @@ export const isExcalidrawElement = (element: any): boolean => {
|
|||
|
||||
export const hasBoundTextElement = (
|
||||
element: ExcalidrawElement | null,
|
||||
): element is ExcalidrawBindableElement => {
|
||||
): element is MarkNonNullable<ExcalidrawBindableElement, "boundElements"> => {
|
||||
return (
|
||||
isBindableElement(element) &&
|
||||
!!element.boundElements?.some(({ type }) => type === "text")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue