Skip to content

Commit 7d674d8

Browse files
committed
web: left-justify light characteristic labels
Merged multi-line light labels were centre-justified, so stacked characteristics read ragged. Left-justify the light-text layer so the lines align on their left edge (e.g. "Mo(U)W 20s 50m 17M" / "Mo(U)R 20s 50m 15M").
1 parent 65061a8 commit 7d674d8

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

web/chartplotter.mjs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1011,6 +1011,9 @@ export class ChartPlotter extends HTMLElement {
10111011
filter: ["==", ["get", "class"], "LIGHTS"],
10121012
layout: { "text-field": ["coalesce", ["get", "text"], ""], "text-font": FONT,
10131013
"text-size": ["coalesce", ["get", "font_size_px"], 10], "text-anchor": "top", "text-offset": [0, 0.4],
1014+
// Left-justify so a merged multi-line light label's lines align on their
1015+
// left edge (e.g. stacked "Mo(U)W 20s 50m 17M" / "Mo(U)R 20s 50m 15M").
1016+
"text-justify": "left",
10141017
"text-allow-overlap": true, "text-ignore-placement": true },
10151018
paint: { "text-color": this.textColor(), "text-halo-color": this.textHaloColor(), "text-halo-width": 1.4, "text-halo-blur": 0.5 } },
10161019
];

0 commit comments

Comments
 (0)