Completed replacing ALL screen pixel ratio calculations with utility
functions. This eliminates all remaining code duplication.
Changes:
- Replaced 3 more calculations in rendering sections:
1. Pixel grid overlay fade calculation (line ~2217)
2. Magnifier label text calculation (line ~2365)
3. Gold scrim overlay threshold check (line ~2399)
- Added back intermediate variables needed for grid calculations:
- mainMapSvgUnitsPerScreenPixel (for grid spacing)
- magnifiedViewBoxWidth (for grid bounds)
Results:
- ALL 8 screen pixel ratio calculations now use utility functions
- Zero code duplication remaining
- All variables properly scoped
- TypeScript passes with no new errors
Next: Extract zoom capping logic to separate utility module.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>