mirror of
https://github.com/zen-browser/desktop.git
synced 2026-02-17 17:08:23 +00:00
Merge branch 'dev' of https://github.com/zen-browser/desktop into dev
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -33,7 +33,12 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
|
||||
'activationMethod',
|
||||
'zen.workspaces.scroll-modifier-key',
|
||||
'ctrl',
|
||||
this._expandWorkspacesStrip.bind(this)
|
||||
);
|
||||
XPCOMUtils.defineLazyPreferenceGetter(
|
||||
this,
|
||||
'naturalScroll',
|
||||
'zen.workspaces.natural-scroll',
|
||||
true
|
||||
);
|
||||
XPCOMUtils.defineLazyPreferenceGetter(
|
||||
this,
|
||||
@@ -169,7 +174,10 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
|
||||
if (Math.abs(delta) < scrollThreshold) return;
|
||||
|
||||
// Determine scroll direction
|
||||
const direction = delta > 0 ? -1 : 1;
|
||||
let direction = delta > 0 ? -1 : 1;
|
||||
if (this.naturalScroll) {
|
||||
direction = delta > 0 ? 1 : -1;
|
||||
}
|
||||
|
||||
// Workspace logic
|
||||
const workspaces = (await this._workspaces()).workspaces;
|
||||
@@ -254,6 +262,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';
|
||||
if (this.naturalScroll){
|
||||
this._swipeState.direction = this._swipeState.cumulativeDelta > 0 ? 'left' : 'right';
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user