#244 Draw one label per ruler tick while levels crossfade
–
- github
- github/openchronology/timeline-app
- github/openchronology/timeline-app#244
- pull request
- state:merged
Fixes #241. While two graduation levels crossfade, a tick carries two label versions. When they print differently, for example "20:00" for half-hour steps and "20h" for hourly ones, both were drawn on top of each other, reading like "20000". Some zooms sit midway through the crossfade, so a still view could stay like that. - `tickLabel` (in `src/ruler.ts`, exported from the core) adds the weights of versions that print the same. Of versions that differ, it draws the stronger one alone, with their combined weight. The label switches over midway through the zoom instead of two showing at once. - The editor draws each tick's label through it. Tests: - A new ruler test uses the issue's 8-hour view, where an hour tick prints both "20:00" and "20h", and checks that one label is drawn. - `npm test` passes (302), and so does the Chromium browser suite. - I checked the same view in the real editor: the hours read "20h", "21h", with the half-hours faint between them. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_011fFY8eruEi1xAkkMBni13B https://github.com/openchronology/timeline-app/pull/244
Related
- #241 Ruler draws two labels on top of each other at each hour at an 8-hour view
- #246 Videos: a Middle-earth canon tour, the source link on every end card, tours recaptured with the ruler fixes
- #247 Add eight vertical shorts, narrate with Kokoro, timescale.info on every end card
- #248 Land the shorts on main (#247 merged into its stacked base)
- Merge pull request #244 from openchronology/fix/241-hour-labels
Open #244 Draw one label per ruler tick while levels crossfade in the timeline