@mocanvas/mocanvas · class

NoteShapeUtil

declare class NoteShapeUtil extends ShapeUtil<NoteShape, NoteShapeUtilDisplayValues>

This one ships without a description. The signature above is read from the package, and the guides cover the area it belongs to.


Methods · 14

canEdit(_shape: NoteShape): boolean
component(shape: NoteShape): ReactNode
getDefaultProps(): NoteShapeProps
getFontFaces(shape: NoteShape): TLFontFace[]

A note is nothing but a label, so it needs its family's faces.

getGeometry(shape: NoteShape): Geometry2d
getIndicatorPath(shape: NoteShape): Path2D
getRenderStyle(shape: NoteShape): StyleWords
getText(shape: NoteShape): string
hasOverlayLabel(_shape: NoteShape): boolean
hideResizeHandles(_shape: NoteShape): boolean
needsOverlay(_shape: NoteShape): boolean

The GPU draws the sticky background even while editing; the overlay adds the gradient and the shadow over it (see component).

onBeforeCreate(next: NoteShape): NoteShape | void
onBeforeUpdate(prev: NoteShape, next: NoteShape): NoteShape | void
onEditEnd(shape: NoteShape): void

Properties · 5

static migrations: _mocanvas_editor.PropsMigrations
static options: NoteShapeOptions
readonly options: NoteShapeOptions
static props: _mocanvas_editor.RecordProps<NoteShape>
static type: "note"

mocanvas is built by Symbio. Free for non-commercial, non-profit and development use; commercial use needs an agreement. Not affiliated with or endorsed by tldraw.