Merge pull request #9194 from amuramoto/gesture

fix(gesture): pass type to hammer.get() so pinch and rotate can be en…
This commit is contained in:
Manu Mtz.-Almeida
2016-11-18 02:20:55 +01:00
committed by GitHub

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);