ArrowShapeUtil
Table of contents
Public class
class ArrowShapeUtil extends ShapeUtil<TLArrowShape> {}
packages/tldraw/src/lib/shapes/arrow/ArrowShapeUtil.tsx
Properties
canBind
Public property
canBind: () => boolean
canEdit
Public property
canEdit: () => boolean
canSnap
Public property
canSnap: () => boolean
hideResizeHandles
Public property
hideResizeHandles: TLShapeUtilFlag<TLArrowShape>
hideRotateHandle
Public property
hideRotateHandle: TLShapeUtilFlag<TLArrowShape>
hideSelectionBoundsBg
Public property
hideSelectionBoundsBg: TLShapeUtilFlag<TLArrowShape>
hideSelectionBoundsFg
Public property
hideSelectionBoundsFg: TLShapeUtilFlag<TLArrowShape>
migrations
Public static property
static migrations: import('@tldraw/editor').Migrations
onDoubleClickHandle
Public property
onDoubleClickHandle: (
shape: TLArrowShape,
handle: TLHandle
) => TLShapePartial<TLArrowShape> | void
TLArrowShape, TLHandle, TLShapePartial
onEditEnd
Public property
onEditEnd: TLOnEditEndHandler<TLArrowShape>
TLOnEditEndHandler, TLArrowShape
onHandleDrag
Public property
onHandleDrag: TLOnHandleDragHandler<TLArrowShape>
TLOnHandleDragHandler, TLArrowShape
onHandleDragStart
Public property
onHandleDragStart: TLOnHandleDragStartHandler<TLArrowShape>
TLOnHandleDragStartHandler, TLArrowShape
onResize
Public property
onResize: TLOnResizeHandler<TLArrowShape>
TLOnResizeHandler, TLArrowShape
onTranslate
Public property
onTranslate?: TLOnTranslateHandler<TLArrowShape>
TLOnTranslateHandler, TLArrowShape
onTranslateStart
Public property
onTranslateStart: TLOnTranslateStartHandler<TLArrowShape>
TLOnTranslateStartHandler, TLArrowShape
props
Public static property
static props: {
labelColor: import('@tldraw/editor').EnumStyleProp<
| 'black'
| 'blue'
| 'green'
| 'grey'
| 'light-blue'
| 'light-green'
| 'light-red'
| 'light-violet'
| 'orange'
| 'red'
| 'violet'
| 'yellow'
>
color: import('@tldraw/editor').EnumStyleProp<
| 'black'
| 'blue'
| 'green'
| 'grey'
| 'light-blue'
| 'light-green'
| 'light-red'
| 'light-violet'
| 'orange'
| 'red'
| 'violet'
| 'yellow'
>
fill: import('@tldraw/editor').EnumStyleProp<
'none' | 'pattern' | 'semi' | 'solid'
>
dash: import('@tldraw/editor').EnumStyleProp<
'dashed' | 'dotted' | 'draw' | 'solid'
>
size: import('@tldraw/editor').EnumStyleProp<'l' | 'm' | 's' | 'xl'>
arrowheadStart: import('@tldraw/editor').EnumStyleProp<
| 'arrow'
| 'bar'
| 'diamond'
| 'dot'
| 'inverted'
| 'none'
| 'pipe'
| 'square'
| 'triangle'
>
arrowheadEnd: import('@tldraw/editor').EnumStyleProp<
| 'arrow'
| 'bar'
| 'diamond'
| 'dot'
| 'inverted'
| 'none'
| 'pipe'
| 'square'
| 'triangle'
>
font: import('@tldraw/editor').EnumStyleProp<
'draw' | 'mono' | 'sans' | 'serif'
>
start: import('@tldraw/editor').UnionValidator<
'type',
{
binding: import('@tldraw/editor').ObjectValidator<{
type: 'binding'
boundShapeId: import('@tldraw/editor').TLShapeId
normalizedAnchor: import('@tldraw/editor').VecModel
isExact: boolean
isPrecise: boolean
}>
point: import('@tldraw/editor').ObjectValidator<{
type: 'point'
x: number
y: number
}>
},
never
>
end: import('@tldraw/editor').UnionValidator<
'type',
{
binding: import('@tldraw/editor').ObjectValidator<{
type: 'binding'
boundShapeId: import('@tldraw/editor').TLShapeId
normalizedAnchor: import('@tldraw/editor').VecModel
isExact: boolean
isPrecise: boolean
}>
point: import('@tldraw/editor').ObjectValidator<{
type: 'point'
x: number
y: number
}>
},
never
>
bend: import('@tldraw/editor').Validator<number>
text: import('@tldraw/editor').Validator<string>
labelPosition: import('@tldraw/editor').Validator<number>
}
EnumStyleProp, UnionValidator, ObjectValidator, TLShapeId, VecModel, Validator
type
Public static property
static type: 'arrow'
Methods
component()
Public method
component(shape: TLArrowShape): import('react/jsx-runtime').JSX.Element | null
Name | Description |
---|---|
|
|
import('react/jsx-runtime').JSX.Element | null
getCanvasSvgDefs()
Public method
getCanvasSvgDefs(): TLShapeUtilCanvasSvgDef[]
getDefaultProps()
Public method
getDefaultProps(): TLArrowShape['props']
getGeometry()
Public method
getGeometry(shape: TLArrowShape): Group2d
Name | Description |
---|---|
|
|
Group2d
getHandles()
Public method
getHandles(shape: TLArrowShape): TLHandle[]
Name | Description |
---|---|
|
|
TLHandle[]
indicator()
Public method
indicator(shape: TLArrowShape): import('react/jsx-runtime').JSX.Element | null
Name | Description |
---|---|
|
|
import('react/jsx-runtime').JSX.Element | null
toSvg()
Public method
toSvg(shape: TLArrowShape, ctx: SvgExportContext): SVGGElement
Name | Description |
---|---|
|
|
|
|
SVGGElement
TLArrowShape, SvgExportContext