Optional
referencePoint?: { x: number; y: number }If a position (e.g. a cursor position) is given, only edges within the corresponding horizontal/vertical range will be returned.
For example, if the visual edge is vertical, the function will only return edges that contain the y position, ignoring the x position. See the function documentation for a visual example.
Optional
searchDirections?: ("up" | "down" | "left" | "right")[]Several frames can lay to either side of a visual edge. This limits the directions in which to look. Otherwise we look in the directions perpendicular to the visual edge.
See the function documentation for a visual example.
Given an edge or visualEdge (which might touch/contain several frame edges, see getVisualEdges), returns the frame edges that match the given criteria. If no criteria is given, just returns all touching frames.
Useful, for implementing drag related features.
A visual explanation of the options:
So given the middle visual edge, the point
+
and the right search direction, would return the left edge of frame D.Given the left direction instead it would return C.
Given no point, and the right direction it would return B and D.