Skip to content

Commit a01410d

Browse files
committed
pinchTracker: Emit gesture when tracker has pending ack too
This fixes issue when confirmPinch was not called, so tracker remains in pending-ack state
1 parent 83f422f commit a01410d

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

extension/src/trackers/pinchTracker.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -211,12 +211,12 @@ export const TouchpadPinchGesture = registerClass({
211211
}
212212

213213
private _emitBegin() {
214+
if (this._ackState === GestureACKState.ACKED)
215+
return;
214216
this._historyTracker.reset();
215-
if (this._ackState === GestureACKState.NONE) {
216-
this._ackState = GestureACKState.PENDING_ACK;
217-
this._progress_scale = 1.0;
218-
this.emit('begin');
219-
}
217+
this._ackState = GestureACKState.PENDING_ACK;
218+
this._progress_scale = 1.0;
219+
this.emit('begin');
220220
}
221221

222222
private _emitUpdate(time: number, pinch_scale: number) {

0 commit comments

Comments
 (0)