haojianlong 4 лет назад
Родитель
Сommit
5d272ec880
1 измененных файлов с 2 добавлено и 4 удалено
  1. 2 4
      src/lib/FloorView.js

+ 2 - 4
src/lib/FloorView.js

@@ -52,10 +52,8 @@ export class FloorView extends SGraphView {
     onMouseMove(event) {
         let se = new SMouseEvent(event);
         if (se.buttons & SMouseButton.LeftButton) {
-            if (this.spaceKey) {
-                this.origin.x += se.x - this._leftKeyPos.x;
-                this.origin.y += se.y - this._leftKeyPos.y;
-            }
+            this.origin.x += se.x - this._leftKeyPos.x;
+            this.origin.y += se.y - this._leftKeyPos.y;
             this._leftKeyPos.x = se.x;
             this._leftKeyPos.y = se.y;
             this.update();