fix(gesture): pass type to hammer.get() so pinch and rotate can be enabled

This commit is contained in:
Alex Muramoto
2016-11-16 21:25:59 -08:00
parent 9469b4ff9a
commit 66afe34d64

View File

@@ -38,7 +38,7 @@ export class Gesture {
on(type: string, cb: Function) {
if (type === 'pinch' || type === 'rotate') {
this._hammer.get('pinch').set({enable: true});
this._hammer.get(type).set({enable: true});
}
this._hammer.on(type, cb);
(this._callbacks[type] || (this._callbacks[type] = [])).push(cb);