NoteShapeUtil
Public Class
Table of Contents
Signature
class NoteShapeUtil extends ShapeUtil<TLNoteShape> {}
References
Properties
canEdit
Public Property
Signature
canEdit: () => boolean
hideResizeHandles
Public Property
Signature
hideResizeHandles: () => boolean
hideSelectionBoundsBg
Public Property
Signature
hideSelectionBoundsBg: () => boolean
hideSelectionBoundsFg
Public Property
Signature
hideSelectionBoundsFg: () => boolean
onBeforeCreate
Public Property
Signature
onBeforeCreate: (next: TLNoteShape) =>
| {
props: {
growY: number
color:
| 'black'
| 'blue'
| 'green'
| 'grey'
| 'light-blue'
| 'light-green'
| 'light-red'
| 'light-violet'
| 'orange'
| 'red'
| 'violet'
| 'yellow'
size: 'l' | 'm' | 's' | 'xl'
font: 'draw' | 'mono' | 'sans' | 'serif'
align: 'end' | 'middle' | 'start'
verticalAlign: 'end' | 'middle' | 'start'
url: string
text: string
}
type: 'note'
x: number
y: number
rotation: number
index: string
parentId: import('@tldraw/tlschema').TLParentId
isLocked: boolean
opacity: number
id: import('@tldraw/tlschema').TLShapeId
typeName: 'shape'
}
| undefined
References
TLNoteShape, TLParentId, TLShapeId
onBeforeUpdate
Public Property
Signature
onBeforeUpdate: (
prev: TLNoteShape,
next: TLNoteShape
) =>
| {
props: {
growY: number
color:
| 'black'
| 'blue'
| 'green'
| 'grey'
| 'light-blue'
| 'light-green'
| 'light-red'
| 'light-violet'
| 'orange'
| 'red'
| 'violet'
| 'yellow'
size: 'l' | 'm' | 's' | 'xl'
font: 'draw' | 'mono' | 'sans' | 'serif'
align: 'end' | 'middle' | 'start'
verticalAlign: 'end' | 'middle' | 'start'
url: string
text: string
}
type: 'note'
x: number
y: number
rotation: number
index: string
parentId: import('@tldraw/tlschema').TLParentId
isLocked: boolean
opacity: number
id: import('@tldraw/tlschema').TLShapeId
typeName: 'shape'
}
| undefined
References
TLNoteShape, TLParentId, TLShapeId
onEditEnd
Public Property
Signature
onEditEnd: TLOnEditEndHandler<TLNoteShape>
References
TLOnEditEndHandler, TLNoteShape
type
Public Static Property
Signature
static type: 'note'
Methods
defaultProps()
Public Method
Parameters
None
Returns
TLNoteShape['props']
References
getBounds()
Public Method
Parameters
Name | Description |
---|---|
|
|
Returns
Box2d
References
getCenter()
Public Method
Parameters
Name | Description |
---|---|
|
|
Returns
Vec2d
References
getHeight()
Public Method
Parameters
Name | Description |
---|---|
|
|
Returns
number
References
getOutline()
Public Method
Parameters
Name | Description |
---|---|
|
|
Returns
Vec2d[]
References
indicator()
Public Method
Parameters
Name | Description |
---|---|
|
|
Returns
JSX.Element
References
render()
Public Method
Parameters
Name | Description |
---|---|
|
|
Returns
JSX.Element
References
toSvg()
Public Method
Parameters
Name | Description |
---|---|
|
|
|
|
|
|
Returns
SVGGElement
References
TLNoteShape, TLExportColors, SVGGElement