fix hammer_gestures infinite loop
This commit is contained in:
parent
2c7c3e3c69
commit
41e38e4330
|
@ -24,9 +24,9 @@ export class HammerGesturesPlugin extends HammerGesturesPluginCommon {
|
|||
var mc = new Hammer(element);
|
||||
mc.get('pinch').set({enable: true});
|
||||
mc.get('rotate').set({enable: true});
|
||||
var handler = function(eventObj) { zone.run(function() { handler(eventObj); }); };
|
||||
mc.on(eventName, handler);
|
||||
return () => { mc.off(eventName, handler); };
|
||||
var callback = function(eventObj) { zone.run(function() { handler(eventObj); }); };
|
||||
mc.on(eventName, callback);
|
||||
return () => { mc.off(eventName, callback); };
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue