v0.13.5
Step 5 — Elevation curve
Adds the elevation curve as two SVG <path> elements drawn from a server-emitted, LTTB-downsampled (distance, elevation) array. The chart now carries an elevation profile over Step 4's axes and ticks, with an optional translucent fill under the curve.
Highlights
- New
Rendering\Elevation_Sampleshelper — composes(distance, elevation)extraction withLttb::downsample(). BothRender_Elevation::render()andRest\Preview_Controller::get_preview()call it under the filterkntnt_gpx_blocks_elevation_target_points(default300). - LTTB resurrected verbatim from v0.12.0 (
Rendering\Lttb+ its unit-test suite). - Shared
ChartScalehelper (src/blocks/elevation/geometry/scale.ts) consumed by both editor preview (chart.tsx) and the frontend Interactivity host (view.ts). Eliminates the duplicated projection math both hosts carried. - Two
<path>elements in the SVG: a closed fill path below the curve and an open stroke path on top. The fill path is always emitted; visibility is governed by the--kntnt-gpx-blocks-elevation-plot-fillCSS variable. - New
plotFillColorblock attribute — total attribute count 35 → 36. - Per-mapId state slice gains a
samplesfield; REST response gains the same field for editor previews. - Resize behaviour unchanged: margins stay cached, curve re-projects on every resize, stroke width pixel-stable via
vector-effect="non-scaling-stroke".
Released-step recap to follow.