@mocanvas/mocanvas · interface
interface NoteShapeUtilDisplayValues extends TLDefaultDisplayValuesWhat a note paints with, once its style props have been resolved.
Wider than the shared set because a note is not a filled rectangle with a
label on it: its body colour comes from the palette's *note* tokens rather
than from a fill style, and its label has a padding and a typography of its
own that anything measuring the note has to agree with. Callers read them
through getDisplayValues(util, note), which is the only place the live
theme and colour mode are consulted.
noteWidth and noteHeight are the note's **logical square**, before
growY. That is deliberate: the square is the note's identity, and a caller
fitting text into it wants the box the text has to fit, not the box the text
already grew.
Properties · 10
labelBaseFontSize: numberThe label's font size in page units *before* fontSizeAdjustment: the
size style, scaled. The denominator that adjustment is a fraction of.
labelFontFamily: stringThe label's CSS font stack.
labelFontSize: numberThe label's font size in page units, after any fontSizeAdjustment.
labelFontStyle: stringThe label's CSS font-style.
labelFontVariant: stringThe label's CSS font-variant.
labelFontWeight: stringThe label's CSS font-weight.
labelLineHeight: numberThe label's CSS line-height, as a unitless multiple of the font size.
labelPadding: numberPadding on every side between the body edge and its label, in page units.
noteHeight: numberThe body's height in page units before growY; equal to noteWidth.
noteWidth: numberThe body's width in page units, scale applied.
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.