feat(ui): options panel with an IndexedDB-backed lineweight display scale
Set the default lineweight scale to 11 px/mm: the value the user matched against AutoCAD on the actual screen. The 20 px/mm derived from their screenshot was too heavy in practice - the capture and the monitor do not share a DPI - so the constant is now only a starting point. Move the lineweight controls off the toolbar into an Options panel: display toggle, scale slider plus number box, a readout of what the drawing's own weights come out to, grid toggle, zoom speed, and a reset. Settings persist in IndexedDB (hmw-viewer/options) rather than localStorage, so values keep their type and the store has room to grow per-drawing later; every call degrades quietly if storage is blocked. Scale changes still apply to the live materials - each fat batch now remembers its weight in mm - so dragging the slider retunes a 37MB drawing instantly. Verified headless: 0.35mm renders 3-4px at scale 11 and 8-9px at 25, matching the readout, and the value survives a reload via IndexedDB. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user