|
@@ -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) {
|