Skip to content

Commit

Permalink
fixBug[waves.js]: wave's position (#949)
Browse files Browse the repository at this point in the history
* fixBug[waves.js]-wave's position

* fix[waves.js]-wave's position
  • Loading branch information
shufangyi authored and PanJiaChen committed Aug 13, 2018
1 parent f3733c0 commit 312a2ca
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/directive/waves/waves.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ export default{
ripple.style.left = (rect.width / 2 - ripple.offsetWidth / 2) + 'px'
break
default:
ripple.style.top = (e.pageY - rect.top - ripple.offsetHeight / 2 - document.body.scrollTop) + 'px'
ripple.style.left = (e.pageX - rect.left - ripple.offsetWidth / 2 - document.body.scrollLeft) + 'px'
ripple.style.top = (e.pageY - rect.top - ripple.offsetHeight / 2 - document.documentElement.scrollTop || document.body.scrollTop) + 'px'
ripple.style.left = (e.pageX - rect.left - ripple.offsetWidth / 2 - document.documentElement.scrollLeft || document.body.scrollLeft) + 'px'
}
ripple.style.backgroundColor = opts.color
ripple.className = 'waves-ripple z-active'
Expand Down

0 comments on commit 312a2ca

Please sign in to comment.