diff options
| author | user <user@clank> | 2026-08-30 15:38:14 +0200 |
|---|---|---|
| committer | user <user@clank> | 2026-08-30 15:38:14 +0200 |
| commit | 6e25c746e7cf3184fd30cae4d4c10299315717ce (patch) | |
| tree | d03d64e56231fe83ee2279c2e3e1644aac1bfcd3 /web/site.css | |
| parent | webdemo: land in the playground, not just the demo (diff) | |
| download | slosh-6e25c746e7cf3184fd30cae4d4c10299315717ce.tar.gz slosh-6e25c746e7cf3184fd30cae4d4c10299315717ce.tar.xz slosh-6e25c746e7cf3184fd30cae4d4c10299315717ce.zip | |
webdemo: fit with font size, not scale -- a transform misplaces clicks
xterm turns a mouse event into a cell with getBoundingClientRect() and
its own unscaled cell metrics, so the scale() that stretched the fixed
grid into the stage put every click on the wrong cell, off by the
scale factor. Desktop kept the factor near 1 -- cols and rows are
derived from the same room the scale fills -- so it passed for
working; a phone is forced onto the 80-column floor, the factor lands
near a half, and a tap selects a pane the finger never touched.
Refit the font size instead: walk it until the grid fills the room
(iterated, cell metrics are not linear in font size), centre the
leftover with translate, which moves rect and clicks together. The
grid stays what the guest was told at boot; only the glyphs move. A
webfont resolving late changes the metrics under the fit, so refit
again when document.fonts settles.
Diffstat (limited to 'web/site.css')
0 files changed, 0 insertions, 0 deletions
