From 00229a9403b6865b325ac9603842497348535bd0 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期三, 06 三月 2024 13:17:43 +0800
Subject: [PATCH] #
---
zy-asrs-flow/src/pages/map/utils.js | 18 ++++++++++++++++--
1 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/zy-asrs-flow/src/pages/map/utils.js b/zy-asrs-flow/src/pages/map/utils.js
index f97a5f9..f55ad8b 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;
@@ -34,6 +32,7 @@
// sprite be movable from sprite click event
export const beMovable = (sprite, setDidClickSprite) => {
sprite.off('pointerup');
+ sprite.off('pointermove');
sprite.off('pointerdown');
sprite.off('click');
@@ -60,6 +59,7 @@
if (dragTarget) {
setDidClickSprite(false);
this.parent.off('pointermove');
+ this.parent.off('pointerup');
dragTarget.alpha = 1;
dragTarget = null;
}
@@ -67,6 +67,20 @@
}
+// sprite be beSettings from sprite click event
+export const beSettings = (sprite, setDidClickSprite) => {
+ sprite.off('pointerup');
+ sprite.off('pointermove');
+ sprite.off('pointerdown');
+ sprite.off('click');
+
+ sprite.on("click", onClick);
+
+ function onClick(event) {
+ // setDidClickSprite(true);
+ }
+}
+
// sprites be movable from select box
// the scale was dynamic
export const spriteListBeMovable = (selectedSprites, scale, resetFn) => {
--
Gitblit v1.9.1