diff options
| author | Tyler Hoang <tyler@tylerhoang.xyz> | 2026-05-28 18:13:06 -0700 |
|---|---|---|
| committer | Tyler Hoang <tyler@tylerhoang.xyz> | 2026-05-28 18:13:06 -0700 |
| commit | 343b9992e296c2b6ce14a0dabafac31b45620e30 (patch) | |
| tree | 411dabbed92b2d142d389e4adc3d3d260d9e96bb /index.html | |
| parent | bbe912778407ee3434b68c959a72b834e1787ba9 (diff) | |
aero: fix 1:1 drag at non-1.0 zoom, scale window text on resize
Drag and resize handlers were reading pointer deltas in visual pixels
but writing to style.left/width which live in the (zoomed) layout
coord space — so dragging at zoom 0.7 lagged 30% behind the cursor.
Now divide deltas by window.__uiScale (set by the desktop-fit script).
Also: when a window is resized, scale its title bar and body via
`zoom` so the text inside grows/shrinks with the window. Baseline is
captured on first resize.
Diffstat (limited to 'index.html')
| -rwxr-xr-x | index.html | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -293,6 +293,7 @@ var s = Math.min(window.innerWidth / BASE_W, window.innerHeight / BASE_H); s = Math.min(1, Math.max(MIN, s)); document.documentElement.style.zoom = s; + window.__uiScale = s; } fit(); window.addEventListener('resize', fit); @@ -545,7 +546,7 @@ <div class="win glass" id="w-neighbors" style="left: 880px; top: 220px; width: 340px; display: none;"> <div class="titlebar" style="background: var(--title-bar);"><div class="dots"><div class="dot r no-drag" onclick="this.closest('.win').style.display='none'"></div><div class="dot y"></div><div class="dot g"></div></div>Neighbors — the indie web</div> <div class="body"> - <div style="font-size: 11px; opacity: 0.7; margin-bottom: 10px; text-transform: uppercase; letter-spacing: 1.5px;">friends & favorite homepages · 6 of 19</div> + <div style="font-size: 11px; opacity: 0.7; margin-bottom: 10px; text-transform: uppercase; letter-spacing: 1.5px;">friends & favorite homepages · </div> <div class="bud-list"> <div class="bud-row"><div class="bud-led on"></div><div><div class="bud-name">trinh's garden 🌿</div><div class="bud-host">trinh.computer</div></div><div class="bud-mood">repotting a monstera</div></div> <div class="bud-row"><div class="bud-led on"></div><div><div class="bud-name">jay's mixtapes</div><div class="bud-host">jaylim.fm</div></div><div class="bud-mood">new bossa nova set</div></div> @@ -576,9 +577,9 @@ <!-- STICKY NOTE pinned to desktop --> <div class="sticky-note" id="sticky" style="right: 32px; top: 96px;"> <div class="sn-head">remember</div> - water the basil · ☕<br/> - call mom on sunday<br/> - finish thesis ch. <span class="sn-underline">3</span> by friday<br/> + be mindful<br/> + love my wife.<br/> + study for cfa !!!<br/> <span style="opacity:0.7">— and stop checking</span><br/> <span style="opacity:0.7">the news so much</span> <span class="sn-sig">— t.</span> |
