Virtual whiteboard for sketching hand-drawn like diagrams
feat: allow a frame to snap to its children (#9795)
Ryan Dicb33de25f4ae
diff --git a/packages/excalidraw/snapping.ts b/packages/excalidraw/snapping.tsindex 8dd1bd59ac..5f1ba06d5d 100644--- a/packages/excalidraw/snapping.ts+++ b/packages/excalidraw/snapping.ts@@ -13,7 +13,7 @@ import {getDraggedElementsBounds,getElementAbsoluteCoords,} from "@excalidraw/element";-import { isBoundToContainer, isFrameLikeElement } from "@excalidraw/element";+import { isBoundToContainer } from "@excalidraw/element";import { getMaximumGroups } from "@excalidraw/element";@@ -311,20 +311,13 @@ const getReferenceElements = (selectedElements: NonDeletedExcalidrawElement[],appState: AppState,elementsMap: ElementsMap,-) => {- const selectedFrames = selectedElements- .filter((element) => isFrameLikeElement(element))- .map((frame) => frame.id);-- return getVisibleAndNonSelectedElements(+) =>+ getVisibleAndNonSelectedElements(elements,selectedElements,appState,elementsMap,- ).filter(- (element) => !(element.frameId && selectedFrames.includes(element.frameId)),);-};export const getVisibleGaps = (elements: readonly NonDeletedExcalidrawElement[],