ArrowShapeOptions
See source codeTable of contents
- arcArrowCenterSnapDistance
- elbowArrowAxisSnapDistance
- elbowArrowCenterSnapDistance
- elbowArrowEdgeSnapDistance
- elbowArrowPointSnapDistance
- elbowMidpointSnapDistance
- elbowMinSegmentLengthToShowMidpointHandle
- expandElbowLegLength
- hoverPreciseTimeout
- labelCenterSnapDistance
- minElbowHandleDistance
- minElbowLegLength
- pointingPreciseTimeout
- Properties
Options for the arrow shape.
interface ArrowShapeOptions {}
Example
const shapeUtils = [ArrowShapeUtil.configure({ arcArrowCenterSnapDistance: 0 })]
function MyApp() {
return <Tldraw shapeUtils={shapeUtils} />
}
Properties
arcArrowCenterSnapDistance
The distance, in screen pixels, at which we snap to the center of a target shape when drawing an arc arrow. Set to 0 to disable.
readonly arcArrowCenterSnapDistance: number
elbowArrowAxisSnapDistance
The distance, in screen pixels, at which we snap to the axis passing through the center of a shape when drawing an elbow arrow. Set to 0 to disable.
readonly elbowArrowAxisSnapDistance: number
elbowArrowCenterSnapDistance
The distance, in screen pixels, at which we snap to the center of a target shape when drawing an elbow arrow. Set to 0 to disable.
readonly elbowArrowCenterSnapDistance: number
elbowArrowEdgeSnapDistance
The distance, in screen pixels, at which we snap to the edge of a target shape when drawing an elbow arrow. Set to 0 to disable.
readonly elbowArrowEdgeSnapDistance: number
elbowArrowPointSnapDistance
The distance, in screen pixels, at which we snap to one of the 4 directional points (top, right, bottom, left) of a target shape when drawing an elbow arrow. Set to 0 to disable.
readonly elbowArrowPointSnapDistance: number
elbowMidpointSnapDistance
The distance, in screen pixels, at which we snap an elbow arrow midpoint handle to the midpoint between two shapes. Set to 0 to disable.
readonly elbowMidpointSnapDistance: number
elbowMinSegmentLengthToShowMidpointHandle
The minimum length, in screen pixels, of an elbow arrows midpoint segment before we show the handle for dragging that segment.
readonly elbowMinSegmentLengthToShowMidpointHandle: number
expandElbowLegLength
How far should elbow arrows expand from the shapes they're targeting?
readonly expandElbowLegLength: Record<TLDefaultSizeStyle, number>
hoverPreciseTimeout
When hovering over a shape using the arrow tool, how long should we wait before we assume the user is targeting precisely instead of imprecisely.
readonly hoverPreciseTimeout: number
labelCenterSnapDistance
The distance, in screen pixels, at which we snap an arrow label to center of the arrow when dragging it. Set to 0 to disable.
readonly labelCenterSnapDistance: number
minElbowHandleDistance
The minimum distance, in screen pixels, between two handles on an elbow arrow. If two handles would be closer than this distance, they're both hidden.
readonly minElbowHandleDistance: number
minElbowLegLength
The minimum length of an elbow arrow's leg.
readonly minElbowLegLength: Record<TLDefaultSizeStyle, number>
pointingPreciseTimeout
When pointing at a shape using the arrow tool or draggin an arrow terminal handle, how long should we wait before we assume the user is targeting precisely instead of imprecisely.
readonly pointingPreciseTimeout: number