Skip to main content

Function: measureNote()

function measureNote(
note,
measure?,
size?
): object;

Size of a sticky note. size.w (a saved width) sets the box width, clamped to METRICS.noteMinWidth .. noteMaxWidth, and the text wraps at w - 2 × notePadding; size.h is the box height as is (at least METRICS.noteMinHeight), otherwise the height the wrapped text needs. Without size the note is METRICS.noteWidth wide.

Parameters​

note​

StickyNote

measure?​

TextMeasure = estimateTextWidth

size?​

| { h?: number; w?: number; } | null

Returns​

object

height​

height: number;

width​

width: number;