Merge pull request #82 from FezVrasta/develop

fix #76
This commit is contained in:
Fez Vrasta 2014-10-04 09:06:49 +02:00
commit e27f57bda1
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) {