mirror of
https://github.com/konvajs/konva.git
synced 2025-12-17 09:54:56 +08:00
Merge branch 'master' of git://github.com/ericdrowell/KineticJS
This commit is contained in:
18
src/Node.js
18
src/Node.js
@@ -398,14 +398,20 @@
|
||||
}
|
||||
return this;
|
||||
},
|
||||
// some event aliases for third party integration like HammerJS
|
||||
// some event aliases for third party integration like HammerJS
|
||||
dispatchEvent: function(evt) {
|
||||
evt.target = this;
|
||||
evt.type = evt.evt.type;
|
||||
this.fire(evt.type, evt);
|
||||
var e = {
|
||||
target: this,
|
||||
type: evt.type,
|
||||
evt: evt
|
||||
};
|
||||
this.fire(evt.type, e);
|
||||
},
|
||||
addEventListener: function() {
|
||||
this.on.apply(this, arguments);
|
||||
addEventListener: function(type, handler) {
|
||||
// we to pass native event to handler
|
||||
this.on(type, function(evt){
|
||||
handler.call(this, evt.evt);
|
||||
});
|
||||
},
|
||||
/**
|
||||
* remove self from parent, but don't destroy
|
||||
|
||||
Reference in New Issue
Block a user