Skip to content

Commit

Permalink
Fix cancell typo (#2854)
Browse files Browse the repository at this point in the history
## Description

Recently, I found a typo that was bothering me, so I decided to correct it.

## Test plan

Add `shouldCancelWhenOutside` to any `Pan` and check that it works.
  • Loading branch information
m-bert authored Apr 8, 2024
1 parent 7340a7f commit 0fccc42
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/web/handlers/GestureHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export default abstract class GestureHandler implements IGestureHandler {
private lastSentState: State | null = null;
protected currentState: State = State.UNDETERMINED;

protected shouldCancellWhenOutside = false;
protected shouldCancelWhenOutside = false;
protected hasCustomActivationCriteria = false;
protected enabled = false;

Expand Down Expand Up @@ -317,7 +317,7 @@ export default abstract class GestureHandler implements IGestureHandler {
}
}
protected onPointerLeave(event: AdaptedEvent): void {
if (this.shouldCancellWhenOutside) {
if (this.shouldCancelWhenOutside) {
switch (this.currentState) {
case State.ACTIVE:
this.cancel();
Expand Down Expand Up @@ -362,7 +362,7 @@ export default abstract class GestureHandler implements IGestureHandler {
if (
this.enabled &&
this.active &&
(!out || (out && !this.shouldCancellWhenOutside))
(!out || (out && !this.shouldCancelWhenOutside))
) {
this.sendEvent(this.currentState, this.currentState);
}
Expand Down Expand Up @@ -805,11 +805,11 @@ export default abstract class GestureHandler implements IGestureHandler {
}

protected setShouldCancelWhenOutside(shouldCancel: boolean) {
this.shouldCancellWhenOutside = shouldCancel;
this.shouldCancelWhenOutside = shouldCancel;
}

protected getShouldCancelWhenOutside(): boolean {
return this.shouldCancellWhenOutside;
return this.shouldCancelWhenOutside;
}

public getPointerType(): PointerType {
Expand Down

0 comments on commit 0fccc42

Please sign in to comment.