Kelvin Liu 1 year ago
parent
commit
d8a8d49e98
2 changed files with 3 additions and 3 deletions
  1. 2 2
      .vscode/settings.json
  2. 1 1
      src/composables/useWheel.ts

+ 2 - 2
.vscode/settings.json

@@ -4,8 +4,8 @@
   "editor.formatOnSave": true,
   "typescript.format.enable": true,
   "editor.codeActionsOnSave": {
-    "source.fixAll.eslint": true,
-    "source.fixAll": true
+    "source.fixAll.eslint": "explicit",
+    "source.fixAll": "explicit"
   },
   "vue.codeActions.enabled": true,
   "volar.format.initialIndent": {

+ 1 - 1
src/composables/useWheel.ts

@@ -21,7 +21,7 @@ export function useWheel(
         }
 
         // normalizes the value of ev.deltaY to either be 1 or -1 and multiplies it with the double click zoom step?
-        const deltaZoom = props.dblClickZoomStep * ev.deltaY / Math.abs(ev.deltaY);
+        const deltaZoom = props.dblClickZoomStep * ev.deltaY / Math.abs(ev.deltaY) * -1;
         changeZoom(deltaZoom, "wheel");
     }