From c0aeb95d828f2f6ed63fcb49e8c30531bd04a6ba Mon Sep 17 00:00:00 2001 From: luxiaotao1123 <t1341870251@163.com> Date: 星期五, 15 三月 2024 14:21:21 +0800 Subject: [PATCH] # --- zy-asrs-flow/src/pages/map/utils.js | 17 +++++++++++++++++ 1 files changed, 17 insertions(+), 0 deletions(-) diff --git a/zy-asrs-flow/src/pages/map/utils.js b/zy-asrs-flow/src/pages/map/utils.js index 50e85a9..27fffb2 100644 --- a/zy-asrs-flow/src/pages/map/utils.js +++ b/zy-asrs-flow/src/pages/map/utils.js @@ -45,6 +45,23 @@ } // sprite be movable from sprite click event +export const viewFeature = (sprite, setCurSPrite) => { + sprite.off('pointerup'); + sprite.off('pointermove'); + sprite.off('pointerdown'); + sprite.off('click'); + + let viewTarget; + sprite.on("click", onClick); + + function onClick(event) { + setCurSPrite(sprite); + // setDidClickSprite(true); + } + +} + +// sprite be movable from sprite click event export const beMovable = (sprite, setDidClickSprite) => { sprite.off('pointerup'); sprite.off('pointermove'); -- Gitblit v1.9.1