v1.1.1
Features
- Read-only mode:
sigmet.setReadonly(true)freezes editing — it hides the toolbar and every grab handle/guide and ignores pointer edits, while the area + on-shape label stay visible.setReadonly(false)restores everything;isReadonlyreads the state. Toggle as often as you like (re-renders on each flip). The demo gains an external Read-only checkbox in its top bar.
Pre-release audit follow-ups (no behaviour change for the common, non-antimeridian case).
Fixes
- Antimeridian — loaded geometry:
load()now re-expresses longitudes in the FIR working frame, so a geometry fromfromTAC()lines up with an antimeridian-crossing FIR (its handles, clipping and pointer input no longer disagree with the coordinates). - Antimeridian —
lonBandediting: dragging awest > east(AM-crossing) band no longer collapses it — the bounds clamp only to the FIR bbox instead of forcingwest ≤ east. - Degenerate line on translate/rotate: after a whole-line drag or transform, the line-side / corridor endpoints are re-snapped to the FIR border and re-validated (
lineUsable); a step that would leave the line collapsed or self-crossing is rejected, so no degenerate TAC is emitted. - Transform scale floor: the polygon/line transform can no longer blow up its scale when the remembered handle anchor sits near the centroid (
r0is floored like the cursor distance). - Strict role parsing: vertex roles are parsed with a strict
^[a-z]\d+$matcher, so a malformed/empty suffix can't silently resolve to vertex 0.
Internal / API
- Removed the
otherstyle token (and theOtherStyleexport): the opposite-side / quadrant-pick surface is an internal, invisible click zone — there's no reason to theme it. (Breaking only if you setstyle.other.) - Exported the missing
TropicalCycloneGeometrytype (it's produced byfromTAC). setCursoris now private on both adapters (it was never part of theMapAdaptercontract).- De-duplicated the hover-cursor logic into a shared
cursorForHithelper; added aKM_PER_NMconstant for the scattered1.852conversions; addedlineUsableto the pure geometry helpers. - God-module split: the ~19 pure lon/lat helpers (haversine, bearing, destination, projection, polyline sampling, bbox, antimeridian (un)wrap, role parsing) moved out of
sigmet-draw.tsinto a newgeo.ts— the controller drops ~290 lines and the helpers are now directly unit-testable. - Tests: +29 —
lineUsable; a controller harness (fake adapter) covering move-handle translate, vertex-merge rejection,lonBandwrap, antimeridianloadunwrap and read-only mode; and a fullgeo.tssuite. 154 total.