removeEventListener for better HammerJS support

This commit is contained in:
Лаврёнов Антон
2014-04-15 08:51:18 +08:00
parent 0bba93c4fa
commit 61542ea6cc
3 changed files with 13 additions and 7 deletions

View File

@@ -4,7 +4,7 @@
* http://www.kineticjs.com/
* Copyright 2013, Eric Rowell
* Licensed under the MIT or GPL Version 2 licenses.
* Date: 2014-04-14
* Date: 2014-04-15
*
* Copyright (C) 2011 - 2013 by Eric Rowell
*
@@ -2680,11 +2680,14 @@ var Kinetic = {};
this.fire(evt.type, e);
},
addEventListener: function(type, handler) {
// we to pass native event to handler
// we have to pass native event to handler
this.on(type, function(evt){
handler.call(this, evt.evt);
});
},
removeEventListener : function(type) {
this.off(type);
},
/**
* remove self from parent, but don't destroy
* @method

8
kinetic.min.js vendored

File diff suppressed because one or more lines are too long

View File

@@ -418,11 +418,14 @@
this.fire(evt.type, e);
},
addEventListener: function(type, handler) {
// we to pass native event to handler
// we have to pass native event to handler
this.on(type, function(evt){
handler.call(this, evt.evt);
});
},
removeEventListener : function(type) {
this.off(type);
},
/**
* remove self from parent, but don't destroy
* @method