Variable: METRICS
const METRICS: object;
Drawing metrics shared by layout (core) and drawing (renderer). The renderer MUST draw with these values so measured sizes match what is drawn.
Type Declaration
badge
readonly badge: object;
Column badges (NN / U pills and the note dot), drawn between a column's name and type.
badge.dotWidth
readonly dotWidth: 6 = 6;
badge.fontSize
readonly fontSize: 9 = 9;
badge.gap
readonly gap: 4 = 4;
Gap between two badges.
badge.height
readonly height: 14 = 14;
badge.margin
readonly margin: 8 = 8;
Gap between the badges and the name before / the type after them.
cornerRadius
readonly cornerRadius: 8 = 8;
fontFamily
readonly fontFamily: "Inter, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif" = "Inter, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif";
fontSize
readonly fontSize: object;
fontSize.columnName
readonly columnName: 12.5 = 12.5;
fontSize.columnType
readonly columnType: 12 = 12;
fontSize.noteText
readonly noteText: 12 = 12;
fontSize.tableName
readonly tableName: 13 = 13;
fontWeight
readonly fontWeight: object;
fontWeight.columnName
readonly columnName: 400 = 400;
fontWeight.columnType
readonly columnType: 400 = 400;
fontWeight.noteText
readonly noteText: 400 = 400;
fontWeight.tableName
readonly tableName: 600 = 600;
groupHeaderHeight
readonly groupHeaderHeight: 28 = 28;
groupPadding
readonly groupPadding: 24 = 24;
headerHeight
readonly headerHeight: 36 = 36;
headerNoteIconWidth
readonly headerNoteIconWidth: 18 = 18;
Room for the note icon at the right end of a table header (tables with a note).
keyMarkerWidth
readonly keyMarkerWidth: 18 = 18;
Space reserved left of a column name for the PK/FK marker.
maxTableWidth
readonly maxTableWidth: 420 = 420;
minTableWidth
readonly minTableWidth: 180 = 180;
monoFontFamily
readonly monoFontFamily: "ui-monospace, 'SF Mono', Menlo, Consolas, monospace" = "ui-monospace, 'SF Mono', Menlo, Consolas, monospace";
nameTypeGap
readonly nameTypeGap: 16 = 16;
Minimum gap between a column name and its type.
noteLineHeight
readonly noteLineHeight: 18 = 18;
noteMaxWidth
readonly noteMaxWidth: 640 = 640;
noteMinHeight
readonly noteMinHeight: 64 = 64;
noteMinWidth
readonly noteMinWidth: 120 = 120;
notePadding
readonly notePadding: 12 = 12;
noteWidth
readonly noteWidth: 220 = 220;
Default sticky-note width; a saved w replaces it (clamped to noteMinWidth..noteMaxWidth).
paddingX
readonly paddingX: 12 = 12;
rowHeight
readonly rowHeight: 26 = 26;
selfLoopReach
readonly selfLoopReach: 44 = 44;
How far a self ref's loop reaches out of the left edge of its table (room for the markers at both ends). Layout counts it in the diagram bounds; the renderer draws the loop with it.
tableBottomPadding
readonly tableBottomPadding: 4 = 4;
Height of the bottom padding under the last column row.