diff --git a/src/vs/workbench/browser/parts/editor/resourceViewer.ts b/src/vs/workbench/browser/parts/editor/resourceViewer.ts index 8ecf2131c31e4b77ea76153e58113660b21d432c..51ec38a3f7bd1209001b552a100a73ed691d8751 100644 --- a/src/vs/workbench/browser/parts/editor/resourceViewer.ts +++ b/src/vs/workbench/browser/parts/editor/resourceViewer.ts @@ -501,8 +501,8 @@ class InlineImageView { return; } - const isScrollWhellKeyPressed = platform.isMacintosh ? altPressed : ctrlPressed; - if (!isScrollWhellKeyPressed && !e.ctrlKey) { // pinching is reported as scroll wheel + ctrl + const isScrollWheelKeyPressed = platform.isMacintosh ? altPressed : ctrlPressed; + if (!isScrollWheelKeyPressed && !e.ctrlKey) { // pinching is reported as scroll wheel + ctrl return; } @@ -516,7 +516,7 @@ class InlineImageView { let delta = e.deltaY < 0 ? 1 : -1; // Pinching should increase the scale - if (e.ctrlKey && !isScrollWhellKeyPressed) { + if (e.ctrlKey && !isScrollWheelKeyPressed) { delta *= -1; } updateScale(scale as number * (1 - delta * InlineImageView.SCALE_PINCH_FACTOR));