Skip to content

Commit

Permalink
feat: Add a config option to disable jog wheel zoom in zoom mode
Browse files Browse the repository at this point in the history
  • Loading branch information
bjoluc committed Jun 14, 2024
1 parent 33914c7 commit 3f47505
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 6 additions & 0 deletions src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,4 +126,10 @@ var CONFIGURATION = {
* this option to `true`.
*/
flipDisplayRowsByDefault: false,

/**
* Set this option to `true` if you want the jog wheel to move the cursor in zoom mode too
* (instead of zooming in and out).
*/
disableJogWheelZoom: false,
};
6 changes: 4 additions & 2 deletions src/mapping/control.ts
Original file line number Diff line number Diff line change
Expand Up @@ -391,8 +391,10 @@ export function bindControlSection(
.setSubPage(zoomSubPage);

// Use the zoom subpage to make the jog wheel zoom too
page.makeCommandBinding(jogLeft, "Zoom", "Zoom Out").setSubPage(zoomSubPage);
page.makeCommandBinding(jogRight, "Zoom", "Zoom In").setSubPage(zoomSubPage);
if (!config.disableJogWheelZoom) {
page.makeCommandBinding(jogLeft, "Zoom", "Zoom Out").setSubPage(zoomSubPage);
page.makeCommandBinding(jogRight, "Zoom", "Zoom In").setSubPage(zoomSubPage);
}

page.makeActionBinding(directions.center.mSurfaceValue, subPageArea.mAction.mNext);

Expand Down

0 comments on commit 3f47505

Please sign in to comment.