a16f52696494189b877b5f142c65af4b1aca7616
User-visible problem: with the basin config dryRunThresholdPercent=2 (so dryRunLevel ≈ outflowLevel) and highVolumeSafetyThresholdPercent=98 (so highSafetyLevel ≈ overflowLevel), two pairs of threshold lines sat right on top of each other in the tank visual, leaving no room between them for their labels. The 'BELOW' fallback in the label algorithm couldn't fit either, so labels ended up crossing lines. Fix: enforce a minimum 28 px visual gap between adjacent threshold lines inside the tank (≈3.7 % of the 760-tall reference frame, > LABEL_H + 2). Lines closer than that get spread apart while preserving order. If the stack would push the lowest line past the tank floor, the whole stack shifts up to fit. Slight geometric distortion is accepted — the tank visual conveys ordering and zone structure, not exact-scale level measurement; numeric values are still rendered next to each line. Result: at any basin geometry, labels sit cleanly above their line with no overlap, no label-on-line collision, and no fallback to a 'stacked' position that crosses its own line. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
convert
Makes unit conversions
Description
Languages
JavaScript
85%
HTML
15%