From c74518bcf694f2711ddd7d8fdf32b3dbce844939 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期三, 06 三月 2024 09:53:42 +0800
Subject: [PATCH] #
---
zy-asrs-flow/src/pages/map/player.js | 9 ++++-----
zy-asrs-flow/src/pages/map/utils.js | 3 +--
2 files changed, 5 insertions(+), 7 deletions(-)
diff --git a/zy-asrs-flow/src/pages/map/player.js b/zy-asrs-flow/src/pages/map/player.js
index 09fd952..6404073 100644
--- a/zy-asrs-flow/src/pages/map/player.js
+++ b/zy-asrs-flow/src/pages/map/player.js
@@ -16,9 +16,6 @@
this.mapContainer = generatePixiContainer('mapContainer');
this.app.stage.addChild(this.mapContainer);
- this.app.view.addEventListener('contextmenu', (event) => {
- event.preventDefault();
- });
// this.activateMapEvent(null);
this.activateMapScale();
@@ -105,8 +102,7 @@
isSelecting = false;
this.selectionBox.clear();
-
- // batch move
+ // sprites batch move
Utils.spriteListBeMovable(this.selectedSprites, this.scale, () => {
this.activateMapEvent(Utils.MapEvent.SELECTION_BOX);
});
@@ -235,6 +231,9 @@
})
app.stage.eventMode = 'static';
app.stage.hitArea = app.screen;
+ app.view.addEventListener('contextmenu', (event) => {
+ event.preventDefault();
+ });
return app;
}
diff --git a/zy-asrs-flow/src/pages/map/utils.js b/zy-asrs-flow/src/pages/map/utils.js
index f97a5f9..47eac0e 100644
--- a/zy-asrs-flow/src/pages/map/utils.js
+++ b/zy-asrs-flow/src/pages/map/utils.js
@@ -1,6 +1,4 @@
-
-
let app = null;
let mapContainer = null;
@@ -60,6 +58,7 @@
if (dragTarget) {
setDidClickSprite(false);
this.parent.off('pointermove');
+ this.parent.off('pointerup');
dragTarget.alpha = 1;
dragTarget = null;
}
--
Gitblit v1.9.1