ソースを参照

添加左键拖动

haojianlong 4 年 前
コミット
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();