Document multi-warning Brīdinājumi selection and chip restyle
This commit is contained in:
@@ -87,7 +87,7 @@ Monda Regular and Bold are bundled locally and used by the interface and generat
|
||||
|
||||
Brīdinājumi renders the current LVĢMC warning polygons over the same `map_1920x1080`/`map_3840x1440` backgrounds used by Kartes, plus a production border-outline overlay drawn last so it stays crisp above the softened data layer. Warning severity is blurred and filled onto an offscreen layer before compositing, giving the broadcast graphic a feathered rather than hard-edged warning area.
|
||||
|
||||
The canvas always renders exactly one operator-selected warning, matching how these graphics are produced for air; there is no multi-warning composite and no on-canvas legend. The title is derived from the selected warning's phenomenon (`Brīdinājums: {phenomenon}`) but stays manually editable. Each warning is listed as a compact phenomenon-icon chip (icon from the already-bundled `lucide-solid` set, keyword-matched against the LVĢMC phenomenon text). Selecting a warning for the map and viewing its full text are deliberately independent actions on the same chip: a checkbox drives map selection, while clicking the chip body opens that warning's full text in a dialog rendered through a Solid `Portal` above a dimmed, blurred backdrop — so an operator can read a warning without disturbing whichever warning is currently on the map. The chip grid stays uniform regardless of how long an individual warning's description is.
|
||||
The canvas renders every operator-checked warning at once, composited onto one offscreen layer before the shared feather blur is applied; there is no on-canvas legend. Polygons are drawn in ascending severity order (yellow, then orange, then red) so a higher severity painting over a lower one on the same ground reads as the dominant color where warnings overlap — this is how the tool supports the newsroom practice of combining multiple severity levels of one phenomenon (e.g. yellow + orange wind) onto a single export, while mixing different phenomena together remains an operator responsibility rather than something the UI prevents. The title is derived from the first checked warning's phenomenon (`Brīdinājums: {phenomenon}`) but stays manually editable. Each warning is listed as a compact phenomenon-icon chip (icon from the already-bundled `lucide-solid` set, keyword-matched against the LVĢMC phenomenon text) with a fully severity-colored background and white icon/text; a checkbox (custom-styled, not the browser default) independently controls map selection — any number may be checked — while clicking the chip body opens that warning's full text in a dialog rendered through a Solid `Portal` above a dimmed, blurred backdrop, without affecting the selection.
|
||||
|
||||
The backend returns warning polygons as raw latitude/longitude points; the frontend projects them to pixel space with a per-resolution affine transform (`x = a·lon + b·lat + c`, `y = d·lon + e·lat + f`). Each transform is a least-squares fit of well-spread Latvian cities' real-world coordinates against the pixel positions already validated for these same map backgrounds by Kartes/Faktiskā (`cityCoords.ts` + `mapConsts.ts`), rather than an independently eyeballed calibration. An earlier 4-corner bounding-box version of this projection could not represent the source artwork's rotation/shear and drifted up to ~200px on the 3840 canvas; the affine fit lands within ~35px.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user