Skip to content

Commit

Permalink
Improve interaction removal and fix doubletap bug
Browse files Browse the repository at this point in the history
  • Loading branch information
taye committed Apr 3, 2015
1 parent 75ebb16 commit 273f461
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions interact.js
Expand Up @@ -2614,9 +2614,11 @@
}
}

// delete interaction if it's not the only one
if (interactions.length > 1) {
interactions.splice(indexOf(interactions, this), 1);
for (i = 0; i < interactions.length; i++) {
// remove this interaction if it's not the only one of it's type
if (interactions[i] !== this && interactions[i].mouse === this.mouse) {
interactions.splice(indexOf(interactions, this), 1);
}
}
},

Expand Down

0 comments on commit 273f461

Please sign in to comment.