#313 Ruler labels flip between "1997 CE" and "1997-01 CE" while the view moves
–
- github
- github/openchronology/timeline-app
- github/openchronology/timeline-app#313
- issue
- state:closed
Reported on mobile (v0.9.1, the Harry Potter timeline, Gregorian dates): at a zoom of about a year and a half, the ruler's tick at 1 January 1997 keeps switching between **1997 CE** and **1997-01 CE** as the view is dragged, even though nothing else about the view changes. Cause: a tick's label detail is chosen from its label resolution, the time per pixel times the label's pixel spacing. The app passes that spacing as a floating-point pixel width of the tick's interval. For a year-level tick, the resolution should be exactly one Julian year, which is also the year-label threshold, so float rounding lands it a hair either side of the threshold and the label alternates with each tiny change of span (two fingers on a phone are never perfectly still). The same applies to the day, hour and minute thresholds, and to custom formats' `labelResolution` (the Star Wars and Dune formats compare it to a year). 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_011fFY8eruEi1xAkkMBni13B https://github.com/openchronology/timeline-app/issues/313
Related
Open #313 Ruler labels flip between "1997 CE" and "1997-01 CE" while the view moves in the timeline