Skip to content

Commit

Permalink
Merge pull request #3888 from neurokitti/fix-workspace-gestures
Browse files Browse the repository at this point in the history
minor fix in ZenWorkspaces.mjs
  • Loading branch information
mr-cheff authored Dec 19, 2024
2 parents 108e4a6 + 3d0a4c9 commit bb8bab1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/browser/base/zen-components/ZenWorkspaces.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -174,9 +174,9 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
if (Math.abs(delta) < scrollThreshold) return;

// Determine scroll direction
let direction = delta > 0 ? -1 : 1;
let direction = delta > 0 ? 1 : -1;
if (this.naturalScroll) {
direction = delta > 0 ? 1 : -1;
direction = delta > 0 ? -1 : 1;
}

// Workspace logic
Expand Down Expand Up @@ -261,9 +261,9 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {

// Determine swipe direction based on cumulative delta
if (Math.abs(this._swipeState.cumulativeDelta) > 0.25) {
this._swipeState.direction = this._swipeState.cumulativeDelta > 0 ? 'right' : 'left';
this._swipeState.direction = this._swipeState.cumulativeDelta > 0 ? 'left' : 'right';
if (this.naturalScroll){
this._swipeState.direction = this._swipeState.cumulativeDelta > 0 ? 'left' : 'right';
this._swipeState.direction = this._swipeState.cumulativeDelta > 0 ? 'right' : 'left';
}
}

Expand Down

0 comments on commit bb8bab1

Please sign in to comment.