LineShapeUtil
Table of contents
Public class
Signature
class LineShapeUtil extends ShapeUtil<TLLineShape> {}
References
Source
packages/tldraw/src/lib/shapes/line/LineShapeUtil.tsx
Properties
hideResizeHandles
Public property
Signature
hideResizeHandles: () => boolean
hideRotateHandle
Public property
Signature
hideRotateHandle: () => boolean
hideSelectionBoundsBg
Public property
Signature
hideSelectionBoundsBg: () => boolean
hideSelectionBoundsFg
Public property
Signature
hideSelectionBoundsFg: () => boolean
migrations
Public static property
Signature
static migrations: import('@tldraw/editor').TLShapePropsMigrations
References
onHandleDrag
Public property
Signature
onHandleDrag: TLOnHandleDragHandler<TLLineShape>
References
TLOnHandleDragHandler, TLLineShape
onResize
Public property
Signature
onResize: TLOnResizeHandler<TLLineShape>
References
TLOnResizeHandler, TLLineShape
props
Public static property
Signature
static props: {
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'
>
points: import('@tldraw/editor').DictValidator<
string,
{
id: string
index: import('@tldraw/editor').IndexKey
x: number
y: number
}
>
size: import('@tldraw/editor').EnumStyleProp<'l' | 'm' | 's' | 'xl'>
spline: import('@tldraw/editor').EnumStyleProp<'cubic' | 'line'>
}
References
type
Public static property
Signature
static type: 'line'
Methods
component()
Public method
Signature
component(shape: TLLineShape): import('react/jsx-runtime').JSX.Element
Parameters
Name | Description |
---|---|
|
|
Returns
import('react/jsx-runtime').JSX.Element
References
getDefaultProps()
Public method
Signature
getDefaultProps(): TLLineShape['props']
References
getGeometry()
Public method
Signature
getGeometry(shape: TLLineShape): CubicSpline2d | Polyline2d
Parameters
Name | Description |
---|---|
|
|
Returns
CubicSpline2d | Polyline2d
References
TLLineShape, CubicSpline2d, Polyline2d
getHandles()
Public method
Signature
getHandles(shape: TLLineShape): TLHandle[]
Parameters
Name | Description |
---|---|
|
|
Returns
TLHandle[]
References
getHandleSnapGeometry()
Public method
Signature
getHandleSnapGeometry(shape: TLLineShape): HandleSnapGeometry
Parameters
Name | Description |
---|---|
|
|
Returns
HandleSnapGeometry
References
TLLineShape, HandleSnapGeometry
indicator()
Public method
Signature
indicator(shape: TLLineShape): import('react/jsx-runtime').JSX.Element
Parameters
Name | Description |
---|---|
|
|
Returns
import('react/jsx-runtime').JSX.Element
References
toSvg()
Public method
Signature
toSvg(shape: TLLineShape): import('react/jsx-runtime').JSX.Element
Parameters
Name | Description |
---|---|
|
|
Returns
import('react/jsx-runtime').JSX.Element
References