Skip to content

@fabwcie/free-drawing / utils/note

utils/note ​

Variables ​

noteColors ​

const noteColors: Choice<ColorLike>[]

Defined in: packages/free-drawing/src/utils/note.ts:16

Colors of notes, yellow first (default): the light colors of backgrounds


notePadding ​

const notePadding: 16 = 16

Defined in: packages/free-drawing/src/utils/note.ts:27

Space between the text of a note and its sides (drawing units)


noteShadowFilter ​

const noteShadowFilter: string

Defined in: packages/free-drawing/src/utils/note.ts:40

Shadow of notes in svg exports (css filter, drawing units), as drawn


noteSize ​

const noteSize: 200 = 200

Defined in: packages/free-drawing/src/utils/note.ts:24

Size of a new note (drawing units): a square

Functions ​

isNote() ​

isNote(node): node is Rect

Defined in: packages/free-drawing/src/utils/note.ts:47

Shape is a sticky note

Parameters

node

Node

Node of the drawing

Returns

node is Rect

True for a note


noteAttrs() ​

noteAttrs(center, color, opacity): object

Defined in: packages/free-drawing/src/utils/note.ts:56

Attributes of a new note centered on a point

Parameters

center

Vector2d

Center of the note, in drawing coordinates

color

ColorLike

Background color of the note

opacity

number

Opacity of the note (opacity option)

Returns

object

Attributes of the rectangle of the note

cornerRadius

cornerRadius: number = 4

fill

fill: ColorLike = color

height

height: number = noteSize

name

name: string

opacity

opacity: number

width

width: number = noteSize

x

x: number

y

y: number


setupNotes() ​

setupNotes(node): void

Defined in: packages/free-drawing/src/utils/note.ts:99

Notes of a drawing shape drawn with their shadow: called when shapes are added or loaded (the drawing function is not saved)

Parameters

node

Node

Drawing shape or group

Returns

void