Skip to content

Commit 66afe34

Browse files
committed
fix(gesture): pass type to hammer.get() so pinch and rotate can be enabled
1 parent 9469b4f commit 66afe34

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/gestures/gesture.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export class Gesture {
3838

3939
on(type: string, cb: Function) {
4040
if (type === 'pinch' || type === 'rotate') {
41-
this._hammer.get('pinch').set({enable: true});
41+
this._hammer.get(type).set({enable: true});
4242
}
4343
this._hammer.on(type, cb);
4444
(this._callbacks[type] || (this._callbacks[type] = [])).push(cb);

0 commit comments

Comments
 (0)