mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-19 03:32:21 +08:00
fix hammer unlisten
This commit is contained in:
@ -43,15 +43,17 @@ export class Gesture {
|
|||||||
}
|
}
|
||||||
|
|
||||||
unlisten() {
|
unlisten() {
|
||||||
for (let type in this._callbacks) {
|
if (this.hammertime) {
|
||||||
for (let i = 0; i < this._callbacks[type].length; i++) {
|
for (let type in this._callbacks) {
|
||||||
//this.element.removeEventListener(type, this._callbacks[type][i]);
|
for (let i = 0; i < this._callbacks[type].length; i++) {
|
||||||
this.hammertime.off(type, this._callbacks[type]);
|
//this.element.removeEventListener(type, this._callbacks[type][i]);
|
||||||
|
this.hammertime.off(type, this._callbacks[type]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
this.hammertime.destroy();
|
||||||
|
this.hammertime = null;
|
||||||
|
this._callbacks = {}
|
||||||
}
|
}
|
||||||
this.hammertime.destroy();
|
|
||||||
this.hammertime = null;
|
|
||||||
this._callbacks = {}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
destroy() {
|
destroy() {
|
||||||
|
Reference in New Issue
Block a user