fix: allow binding elbow arrows to frame children (#8309)

This commit is contained in:
David Luzar 2024-08-01 19:40:54 +02:00 committed by GitHub
parent 15e019706d
commit e63dd025c9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 9 additions and 1 deletions

View File

@ -38,6 +38,7 @@ import {
isBindingElement,
isBoundToContainer,
isElbowArrow,
isFrameLikeElement,
isLinearElement,
isTextElement,
} from "./typeChecks";
@ -517,7 +518,14 @@ export const getHoveredElementForBinding = (
elements,
(element) =>
isBindableElement(element, false) &&
bindingBorderTest(element, pointerCoords, elementsMap, fullShape),
bindingBorderTest(
element,
pointerCoords,
elementsMap,
// disable fullshape snapping for frame elements so we
// can bind to frame children
fullShape && !isFrameLikeElement(element),
),
);
return hoveredElement as NonDeleted<ExcalidrawBindableElement> | null;
};