Skip to content

Commit

Permalink
unbinding when destroy ui-makeymakey
Browse files Browse the repository at this point in the history
  • Loading branch information
automata committed Apr 29, 2013
1 parent 9c14286 commit 720ac06
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/nodes/ui-makeymakey.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,13 @@ $(function(){
this.send("right", "bang");
this.$(".info").text('Right!');
},
remove: function() {
var keys = ['space', 'up', 'down', 'left', 'right'];
for (key in keys) {
Mousetrap.unbind(key, 'keydown');
}
$(window).unbind('click');
},
outputs: {
space: {
type: "bang"
Expand Down

0 comments on commit 720ac06

Please sign in to comment.