This commit is contained in:
FezVrasta 2014-10-04 08:43:25 +02:00
parent efea979cc7
commit d09279fdb0
2 changed files with 12 additions and 2 deletions

View File

@ -109,7 +109,12 @@ var ripples = {
bind("mouseover", withRipple, rippleInit);
// start ripple effect on mousedown
bind("mousedown", ".ripple-wrapper", rippleStart);
bind("mousedown", ".ripple-wrapper", function(e, $ripple) {
// Start ripple only on left or middle mouse click
if (e.which === 1 || e.which === 2) {
rippleStart(e, $ripple);
}
});
// if animation ends and user is not holding mouse then destroy the ripple
bind("rippleEnd", ".ripple-wrapper .ripple", function(e, $ripple) {

View File

@ -109,7 +109,12 @@ var ripples = {
bind("mouseover", withRipple, rippleInit);
// start ripple effect on mousedown
bind("mousedown", ".ripple-wrapper", rippleStart);
bind("mousedown", ".ripple-wrapper", function(e, $ripple) {
// Start ripple only on left or middle mouse click
if (e.which === 1 || e.which === 2) {
rippleStart(e, $ripple);
}
});
// if animation ends and user is not holding mouse then destroy the ripple
bind("rippleEnd", ".ripple-wrapper .ripple", function(e, $ripple) {