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').TLShapePropsMigrations
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
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: {
  arrowheadEnd: import('@tldraw/editor').EnumStyleProp<
    | 'arrow'
    | 'bar'
    | 'diamond'
    | 'dot'
    | 'inverted'
    | 'none'
    | 'pipe'
    | 'square'
    | 'triangle'
  >
  arrowheadStart: import('@tldraw/editor').EnumStyleProp<
    | 'arrow'
    | 'bar'
    | 'diamond'
    | 'dot'
    | 'inverted'
    | 'none'
    | 'pipe'
    | 'square'
    | 'triangle'
  >
  bend: import('@tldraw/editor').Validator<number>
  color: import('@tldraw/editor').EnumStyleProp<
    | 'black'
    | 'blue'
    | 'green'
    | 'grey'
    | 'light-blue'
    | 'light-green'
    | 'light-red'
    | 'light-violet'
    | 'orange'
    | 'red'
    | 'violet'
    | 'white'
    | 'yellow'
  >
  dash: import('@tldraw/editor').EnumStyleProp<
    'dashed' | 'dotted' | 'draw' | 'solid'
  >
  end: import('@tldraw/editor').UnionValidator<
    'type',
    {
      binding: import('@tldraw/editor').ObjectValidator<{
        boundShapeId: import('@tldraw/editor').TLShapeId
        isExact: boolean
        isPrecise: boolean
        normalizedAnchor: import('@tldraw/editor').VecModel
        type: 'binding'
      }>
      point: import('@tldraw/editor').ObjectValidator<{
        type: 'point'
        x: number
        y: number
      }>
    },
    never
  >
  fill: import('@tldraw/editor').EnumStyleProp<
    'none' | 'pattern' | 'semi' | 'solid'
  >
  font: import('@tldraw/editor').EnumStyleProp<
    'draw' | 'mono' | 'sans' | 'serif'
  >
  labelColor: import('@tldraw/editor').EnumStyleProp<
    | 'black'
    | 'blue'
    | 'green'
    | 'grey'
    | 'light-blue'
    | 'light-green'
    | 'light-red'
    | 'light-violet'
    | 'orange'
    | 'red'
    | 'violet'
    | 'white'
    | 'yellow'
  >
  labelPosition: import('@tldraw/editor').Validator<number>
  size: import('@tldraw/editor').EnumStyleProp<'l' | 'm' | 's' | 'xl'>
  start: import('@tldraw/editor').UnionValidator<
    'type',
    {
      binding: import('@tldraw/editor').ObjectValidator<{
        boundShapeId: import('@tldraw/editor').TLShapeId
        isExact: boolean
        isPrecise: boolean
        normalizedAnchor: import('@tldraw/editor').VecModel
        type: 'binding'
      }>
      point: import('@tldraw/editor').ObjectValidator<{
        type: 'point'
        x: number
        y: number
      }>
    },
    never
  >
  text: import('@tldraw/editor').Validator<string>
}
EnumStyleProp, Validator, UnionValidator, ObjectValidator, TLShapeId, VecModel
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
): import('react/jsx-runtime').JSX.Element
| Name | Description | 
|---|---|
  |  | 
  |  | 
import('react/jsx-runtime').JSX.Element
TLArrowShape, SvgExportContext

