Просмотр исходного кода

修改滚轮放大缩小反向;

haojianlong 5 лет назад
Родитель
Сommit
939f6b97b9

+ 1 - 1
saga-web-draw/package.json

@@ -1,6 +1,6 @@
 {
     "name": "@saga-web/draw",
-    "version": "2.1.71",
+    "version": "2.1.72",
     "description": "上格云绘制引擎。",
     "main": "lib/index.js",
     "types": "lib/index.d.js",

+ 2 - 2
saga-web-draw/src/SCanvasView.ts

@@ -267,9 +267,9 @@ export class SCanvasView extends SObject {
      */
     protected onMouseWheel(event: WheelEvent): void {
         if (event.deltaY < 0) {
-            this.scaleByPoint(1 / this.wheelZoom, event.offsetX, event.offsetY);
-        } else {
             this.scaleByPoint(this.wheelZoom, event.offsetX, event.offsetY);
+        } else {
+            this.scaleByPoint(1 / this.wheelZoom, event.offsetX, event.offsetY);
         }
     } // Function onMouseWheel()
 

+ 1 - 1
saga-web-graphy/src/SGraphyView.ts

@@ -15,7 +15,7 @@ import { SGraphyScene } from "./SGraphyScene";
  */
 export class SGraphyView extends SCanvasView {
     /** 场景对象 */
-    private _scene : SGraphyScene | null = null;
+    private _scene: SGraphyScene | null = null;
     get scene(): SGraphyScene | null {
         return this._scene;
     } // Get scene