Explorar o código

暂时屏蔽掉缩放和平移。

xushiting %!s(int64=2) %!d(string=hai) anos
pai
achega
f479de8515
Modificáronse 1 ficheiros con 18 adicións e 18 borrados
  1. 18 18
      src/views/draw-file/board/editCAD/Layer.js

+ 18 - 18
src/views/draw-file/board/editCAD/Layer.js

@@ -182,12 +182,12 @@ export default class Layer {
                 needAutoRedraw = listenLayer.start(position)
                 break
             case LayerEvents.PanBackGround:
-                stateService.clearItems()
-                coordinate.center.x = coordinate.center.x - (dx * Constant.defaultZoom) / coordinate.zoom / coordinate.res
-                coordinate.center.y = coordinate.center.y + (dy * Constant.defaultZoom) / coordinate.zoom / coordinate.res
-                this.lastX = X
-                this.lastY = Y
-                needAutoRedraw = true
+                // stateService.clearItems()
+                // coordinate.center.x = coordinate.center.x - (dx * Constant.defaultZoom) / coordinate.zoom / coordinate.res
+                // coordinate.center.y = coordinate.center.y + (dy * Constant.defaultZoom) / coordinate.zoom / coordinate.res
+                // this.lastX = X
+                // this.lastY = Y
+                // needAutoRedraw = true
                 break
             case LayerEvents.AddWall:
                 stateService.clearDraggingItem()
@@ -738,18 +738,18 @@ export default class Layer {
     }
 
     onWheel(e) {
-        e.preventDefault()
-        const type = e.type
-        if (type == 'DOMMouseScroll' || type == 'mousewheel') {
-            // 当在canvas用滚轮滚动时
-            const delta = e.wheelDelta ? (e.wheelDelta / 120) * 2 : (-(e.detail || 0) / 3) * 2
-            const zoom = coordinate.zoom + delta
-            if (zoom < 14) {
-                return
-            }
-            coordinate.updateZoom(zoom)
-            this.renderer.autoRedraw()
-        }
+        // e.preventDefault()
+        // const type = e.type
+        // if (type == 'DOMMouseScroll' || type == 'mousewheel') {
+        //     // 当在canvas用滚轮滚动时
+        //     const delta = e.wheelDelta ? (e.wheelDelta / 120) * 2 : (-(e.detail || 0) / 3) * 2
+        //     const zoom = coordinate.zoom + delta
+        //     if (zoom < 14) {
+        //         return
+        //     }
+        //     coordinate.updateZoom(zoom)
+        //     this.renderer.autoRedraw()
+        // }
     }
 
     onKeydown(e) {