Configuration, and the removal of the library's dark mode.
Added — one all-optional config object, from the root entry point:
configureTacticalGraphics({labelSize, lineWidth, hostilityColors,
defaultLineColor, labelFillColor, labelHaloColor,
labelBackgroundFill, handleColor, inertHandleColor,
selectionFillColor, drawMarkerColor,
drawMarkerOutlineColor})
Omit a field and the doctrinal FM 1-02.2 value stands, so an unconfigured
consumer needs none of it. TacticalGraphicsConfig is immutable and composes with
.with(); setTacticalGraphicsConfig replaces wholesale, which is what makes
clearing an override possible. LIGHT_MODE_PALETTE / DARK_MODE_PALETTE /
paletteForMode ship as a ready-made pair. Also new:
getDoctrinalHostilityColor, a pure "what would this be with no override" that a
settings UI needs, and the five resolved chrome accessors.
It lives in the map-agnostic half because none of it is renderer-specific, and
is re-exported from /openlayers for convenience — same symbols, one singleton.
Removed, and breaking:
isDarkMode, setDarkModeFlag, byMode (/openlayers)
TacticalGraphicName.MovingConvoy
TacticalGraphicName.HaltedConvoy (enum 196 -> 194)
The library has no concept of light or dark any more. It has colours, and the
host decides them — a mode flag whose only job was choosing between two
hardcoded literals is a worse config, and it forced hosts into two calls where
forgetting one silently half-updated the map. A mode change is now one call:
configureTacticalGraphics(paletteForMode(dark)).
Two behaviour changes worth reading before upgrading:
- labelSize clamps to [8, 48]. It was Math.max(1, size), with no upper bound
and a lower one admitting sizes no one can read.
- The dark palette is gone. Affiliation colours are now identical in both
modes: they are doctrine, and shifting them for a display setting made a
symbol read differently depending on configuration.
Also in this release: the route/MSR/ASR traffic-direction figure is drawn
geometry rather than three sprites, so the ALT amplifier can exist at all;
status = planned now dashes the route lines; the five crossing-site graphics
dropped a Name field FM 1-02.2 does not give them; and the passage lane DTG
stays upright at every bearing.
348 tests, up from 300. README headline count corrected to 201, matching the
generated table — it had been left at 160.