diff options
author | Dante Catalfamo | 2025-01-08 21:32:26 -0500 |
---|---|---|
committer | Dante Catalfamo | 2025-01-08 21:32:26 -0500 |
commit | 869bc7cabc341fe0b5a05f91d0f55632e0d29653 (patch) | |
tree | 31ee76e038f67b82a38d4fc3ea769407d16a9ca7 | |
parent | 4fbf4bca5e66bd7b7dc5b0dbac337351d3d47bfa (diff) | |
download | homepage-869bc7cabc341fe0b5a05f91d0f55632e0d29653.tar.gz homepage-869bc7cabc341fe0b5a05f91d0f55632e0d29653.tar.bz2 homepage-869bc7cabc341fe0b5a05f91d0f55632e0d29653.zip |
Fixed reversal
-rw-r--r-- | public/trail.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/public/trail.js b/public/trail.js index 97b6d3d..d11c44d 100644 --- a/public/trail.js +++ b/public/trail.js @@ -34,12 +34,13 @@ window.addEventListener("mousemove", (event) => { const diffX = Math.abs(lastX-x); const diffY = Math.abs(lastY-y); const distance = Math.sqrt(diffX*2+diffY*2); + const reversed = x < lastX; if (distance < minDistance) { return; } lastY = y; lastX = x; - placeText(x+"px",y+"px", x < lastX); + placeText(x+"px",y+"px", reversed); }); function placeText(x, y, reversed) { |