TLGetShapeAtPointOptions
See source codeTable of contents
Options to Editor.getShapeAtPoint.
interface TLGetShapeAtPointOptions {}Properties
hitFrameInside
optional
Whether to register hits on the inside of frame shapes. todo: rename this to hitInsideFrames
hitFrameInside?: booleanhitInside
optional
Whether to register hits inside of shapes (beyond the margin), such as the inside of a solid shape.
hitInside?: booleanhitLabels
optional
Whether to register hits on labels.
hitLabels?: booleanhitLocked
optional
Whether to register hits on locked shapes.
hitLocked?: booleanmargin
optional
The margin to apply to the shape. If a number, it will be applied to both the inside and outside of the shape. If an array, the first element will be applied to the inside of the shape, and the second element will be applied to the outside.
margin?: [number, number] | numberExample
// Get the shape at the center of the screen
const shape = editor.getShapeAtProps({
margin: 10,
})
// Get the shape at the center of the screen with a 10px inner margin and a 5px outer margin
const shape = editor.getShapeAtProps({
margin: [10, 5],
})renderingOnly
optional
Whether to only return hits on shapes that are currently being rendered. todo: rename this to hitCulled or hitNotRendering
renderingOnly?: booleanMethods
filter
optional
A filter function to apply to the shapes.
Parameters
| Name | Description |
|---|---|
|
Returns
booleanPrev
TLGeometryOptsNext
TLGridProps