diff --git a/src/content/Components/ChromaGrid/ChromaGrid.vue b/src/content/Components/ChromaGrid/ChromaGrid.vue index 499b4d3..9185a3c 100644 --- a/src/content/Components/ChromaGrid/ChromaGrid.vue +++ b/src/content/Components/ChromaGrid/ChromaGrid.vue @@ -144,8 +144,10 @@ const handleCardClick = (url?: string) => { const handleCardMove = (e: MouseEvent) => { const c = e.currentTarget as HTMLElement; const rect = c.getBoundingClientRect(); - c.style.setProperty('--mouse-x', `${e.clientX - rect.left}px`); - c.style.setProperty('--mouse-y', `${e.clientY - rect.top}px`); + const x = e.clientX - rect.left; + const y = e.clientY - rect.top; + c.style.setProperty('--mouse-x', `${x}px`); + c.style.setProperty('--mouse-y', `${y}px`); }; const spotlightStyle = { @@ -183,11 +185,14 @@ const fadeStyle = {
-
- + +
+
+