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