@mocanvas/editor · interface
interface TLGetShapeAtPointOptions extends HitTestOptionsOptions for Editor.getShapeAtPoint.
The defaults describe "what a person would say is under the pointer": the outline counts, the interior of an unfilled shape does not, locked and hidden shapes are not there at all.
Properties · 6
filter?: (shape: UnknownShape) => booleanArbitrary further filtering, applied last.
hitFrameInside?: booleanCount a hit inside a frame's body rather than only on its edge and heading.
hitInside?: booleanCount a hit inside an unfilled shape's outline.
Off by default, and that is the interesting case: an unfilled rectangle is a frame around empty space, and clicking the space inside it should select whatever is behind, not the rectangle.
hitLabels?: booleanCount a hit on the shape's text label even when the shape itself misses.
hitLocked?: booleanConsider locked shapes. Off by default: a locked shape is not a click target.
margin?: numberExtra tolerance in page units. Defaults to the hit-test margin for the current pointer.
mocanvas is built by Symbio. Free for non-commercial, non-profit and development use; commercial use needs an agreement. Not affiliated with or endorsed by tldraw.