Fixed problem in RipplesJS

This commit is contained in:
Federico Zivolo 2014-08-25 16:41:22 +02:00
parent 48e04ea1a0
commit 34557a2dca

View File

@ -96,15 +96,15 @@ var ripples = {
// init RippleJS and start ripple effect on mousedown // init RippleJS and start ripple effect on mousedown
bind("mousedown", withRipple, rippleInit); bind("mousedown", withRipple, rippleInit);
// start ripple effect on mousedown // start ripple effect on mousedown
bind("mousedown", ".ripple-wrapper, .ripple", rippleStart); bind("mousedown", ".ripple-wrapper, .ripple-wrapper .ripple", rippleStart);
// if animation ends and user is not holding mouse then destroy the ripple // if animation ends and user is not holding mouse then destroy the ripple
bind("rippleEnd", ".ripple-wrapper, .ripple", function(e, $ripple) { bind("rippleEnd", ".ripple-wrapper, .ripple-wrapper .ripple", function(e, $ripple) {
if (!mouseDown) { if (!mouseDown) {
rippleOut($ripple); rippleOut($ripple);
} }
}); });
// Destroy ripple when mouse is not holded anymore if the ripple still exists // Destroy ripple when mouse is not holded anymore if the ripple still exists
bind("mouseup", ".ripple-wrapper, .ripple", function(e, $ripple) { bind("mouseup", ".ripple-wrapper, .ripple-wrapper .ripple", function(e, $ripple) {
if ($ripple.dataset.animating != 1) { if ($ripple.dataset.animating != 1) {
rippleOut($ripple); rippleOut($ripple);
} }