Skip to content

Commit

Permalink
fix(web): resetting locked flicks during a modipress (without cancell…
Browse files Browse the repository at this point in the history
…ing)
  • Loading branch information
jahorton committed Nov 13, 2023
1 parent 1dc94fc commit f47fd0d
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -357,8 +357,9 @@ export class MatcherSelector<Type, StateToken = any> extends EventEmitter<EventM
}
}

// If in a sustain mode, no new models may launch; only existing sequences are allowed to continue.
if(this.sustainMode) {
// If in a sustain mode, no models for new sources may launch;
// only existing sequences are allowed to continue.
if(this.sustainMode && unmatchedSource) {
matchPromise.resolve({
matcher: null,
result: {
Expand Down Expand Up @@ -568,6 +569,10 @@ export class MatcherSelector<Type, StateToken = any> extends EventEmitter<EventM
// There is an action to be resolved...
// But we didn't actually MATCH a gesture.
const replacer = (replacementModel: GestureModel<Type, StateToken>) => {
if(this.sustainMode && !replacementModel.sustainWhenNested) {
return;
}

const replacementMatcher = new GestureMatcher(replacementModel, matcher);

/* IMPORTANT: verify that the replacement model is initially valid.
Expand Down

0 comments on commit f47fd0d

Please sign in to comment.