未验证 提交 682d4c62 编写于 作者: M Matt Bierner 提交者: GitHub

Merge pull request #73731 from hwhung0111/Fix-typo-wheel

Fix typo: isScrollWhellKeyPressed => isScrollWheelKeyPressed
......@@ -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));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册