Преглед на файлове

fix: round ripple area pos

Sv443 преди 9 месеца
родител
ревизия
9fed7857f6
променени са 1 файла, в които са добавени 2 реда и са изтрити 2 реда
  1. 2 2
      src/components/ripple.ts

+ 2 - 2
src/components/ripple.ts

@@ -42,8 +42,8 @@ export function createRipple<TElem extends HTMLElement>(rippleElement?: TElem, p
 
     const rippleAreaEl = document.createElement("span");
     rippleAreaEl.classList.add("bytm-ripple-area");
-    rippleAreaEl.style.left = `${x}px`;
-    rippleAreaEl.style.top = `${y}px`;
+    rippleAreaEl.style.left = `${Math.round(x)}px`;
+    rippleAreaEl.style.top = `${Math.round(y)}px`;
 
     if(rippleEl.firstChild)
       rippleEl.insertBefore(rippleAreaEl, rippleEl.firstChild);