Update ZenWorkspaces.mjs

Signed-off-by: Studio Movie Girl <168581144+neurokitti@users.noreply.github.com>
This commit is contained in:
Studio Movie Girl
2024-12-16 17:07:51 -06:00
committed by GitHub
parent dbdf154e42
commit de24cbd70b

View File

@@ -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;