button-animation
Advanced tools
Comparing version 1.0.7 to 1.0.8
@@ -1,2 +0,2 @@ | ||
export function buttonAnimation (e,color='#fff') { | ||
export function buttonAnimation (e, color = '#fff') { | ||
const style = document.createElement('style') | ||
@@ -31,4 +31,4 @@ style.innerHTML = '.buttonAnimation {' + | ||
overlay.classList.add('buttonAnimation') | ||
const x = e.clientX - e.target.offsetLeft | ||
const y = e.clientY - e.target.offsetTop | ||
const x = e.clientX - e.target.getBoundingClientRect().left | ||
const y = e.clientY - e.target.getBoundingClientRect().top | ||
overlay.style.left = x + 'px' | ||
@@ -35,0 +35,0 @@ overlay.style.top = y + 'px' |
{ | ||
"name": "button-animation", | ||
"version": "1.0.7", | ||
"version": "1.0.8", | ||
"description": "b站上学习到的按钮点击动画", | ||
@@ -5,0 +5,0 @@ "main": "btnAnimation.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
7883