From 7b67d90f4f25eca2480d0d769ec5ab6305c4b4c6 Mon Sep 17 00:00:00 2001 From: Tyler Hoang Date: Thu, 28 May 2026 18:14:54 -0700 Subject: aero: align sparkle cursor with pointer at non-1.0 zoom MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The sparkle div is appended inside the zoomed , so writing raw clientX/Y into style.left/top placed each sparkle at clientX*zoom on screen — drifting toward the origin. Divide by window.__uiScale. --- aero.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/aero.js b/aero.js index 695331f..c789026 100644 --- a/aero.js +++ b/aero.js @@ -48,8 +48,9 @@ function sparkleCursor() { last = now; const s = document.createElement('div'); s.className = 'sparkle'; - s.style.left = e.clientX + 'px'; - s.style.top = e.clientY + 'px'; + const z = window.__uiScale || 1; + s.style.left = (e.clientX / z) + 'px'; + s.style.top = (e.clientY / z) + 'px'; const theme = document.body.dataset.theme; // chrome: iridescent / holographic palette (cyan→magenta→pink) // aero: warm-cool rainbow as before -- cgit v1.3-2-g0d8e