diff options
| author | salmonik <stankiewiczgracjan2019@gmail.com> | 2025-09-03 15:45:37 +0200 |
|---|---|---|
| committer | salmonik <stankiewiczgracjan2019@gmail.com> | 2025-09-03 15:45:37 +0200 |
| commit | d8bbff8ff2ca6bd8a8ef0da28c9b8edc95449f5d (patch) | |
| tree | 6f7407437a2c3a21a7f702663da534728699395d /js/gradient.js | |
| parent | maybe fix scrolling (diff) | |
| download | site-d8bbff8ff2ca6bd8a8ef0da28c9b8edc95449f5d.tar.gz site-d8bbff8ff2ca6bd8a8ef0da28c9b8edc95449f5d.zip | |
fix mobile and correct html
Diffstat (limited to 'js/gradient.js')
| -rw-r--r-- | js/gradient.js | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/js/gradient.js b/js/gradient.js index b36ffb4..28178f7 100644 --- a/js/gradient.js +++ b/js/gradient.js | |||
| @@ -11,8 +11,8 @@ document.addEventListener('DOMContentLoaded', () => { | |||
| 11 | 11 | ||
| 12 | // Handle mouse movement | 12 | // Handle mouse movement |
| 13 | const handleMouseMove = (e) => { | 13 | const handleMouseMove = (e) => { |
| 14 | mouseY = e.clientY + window.scrollY; | 14 | mouseY = e.clientY |
| 15 | mouseX = e.clientX + window.scrollX; | 15 | mouseX = e.clientX |
| 16 | 16 | ||
| 17 | }; | 17 | }; |
| 18 | 18 | ||
| @@ -35,7 +35,6 @@ document.addEventListener('DOMContentLoaded', () => { | |||
| 35 | 35 | ||
| 36 | // Handle touch events for mobile | 36 | // Handle touch events for mobile |
| 37 | window.addEventListener('touchmove', (e) => { | 37 | window.addEventListener('touchmove', (e) => { |
| 38 | e.preventDefault(); | ||
| 39 | const touch = e.touches[0]; | 38 | const touch = e.touches[0]; |
| 40 | handleMouseMove({ | 39 | handleMouseMove({ |
| 41 | clientX: touch.clientX, | 40 | clientX: touch.clientX, |
