Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dist/build.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/build.js.map

Large diffs are not rendered by default.

7 changes: 5 additions & 2 deletions src/ripple.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,18 @@ var Ripple = {
var target = el;
// Get border to avoid offsetting on ripple container position
var targetBorder = parseInt((getComputedStyle(target).borderWidth).replace('px', ''));

var clientX = event.clientX || event.touches[0].clientX
var clientY = event.clientY || event.touches[0].clientY

// Get necessary variables
var rect = target.getBoundingClientRect(),
left = rect.left,
top = rect.top,
width = target.offsetWidth,
height = target.offsetHeight,
dx = event.clientX - left,
dy = event.clientY - top,
dx = clientX - left,
dy = clientY - top,
maxX = Math.max(dx, width - dx),
maxY = Math.max(dy, height - dy),
style = window.getComputedStyle(target),
Expand Down