components/minimap-labels
Type Aliases
Section titled “Type Aliases”MinimapLabelSide
Section titled “MinimapLabelSide”MinimapLabelSide =
"below"|"above"|"right"|"left"|"below-right"|"below-left"|"above-right"|"above-left"|"hidden"
Where a mark’s name sits, or hidden.
MinimapLabelInput
Section titled “MinimapLabelInput”MinimapLabelInput =
Readonly<{x:number;y:number;named:boolean;solid:boolean;goal:boolean;label:string; }>
A caller-provided minimap label and its anchor.
MinimapLabelMetrics
Section titled “MinimapLabelMetrics”MinimapLabelMetrics =
Readonly<{width:number;height:number;charWidth:number;lineHeight:number;padding:number;dot:number;gap:number; }>
Measured label dimensions used to place minimap labels.
Functions
Section titled “Functions”layoutMinimapLabels()
Section titled “layoutMinimapLabels()”layoutMinimapLabels(
marks,metrics):MinimapLabelSide[]
The side each mark’s label takes, index for index with marks.
Parameters
Section titled “Parameters”readonly Readonly<{ x: number; y: number; named: boolean;
solid: boolean; goal: boolean; label: string; }>[]