From 490892b06913df8ec77d1935543f62605bfc3bdd Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期一, 11 三月 2024 17:02:47 +0800
Subject: [PATCH] #
---
zy-asrs-flow/src/pages/map/utils.js | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
diff --git a/zy-asrs-flow/src/pages/map/utils.js b/zy-asrs-flow/src/pages/map/utils.js
index c01b8d8..0c9ab59 100644
--- a/zy-asrs-flow/src/pages/map/utils.js
+++ b/zy-asrs-flow/src/pages/map/utils.js
@@ -12,6 +12,10 @@
mapContainer = param;
}
+export function getMapContainer() {
+ return mapContainer;
+}
+
export const MapEvent = Object.freeze({
SELECTION_BOX: Symbol.for(0),
})
@@ -203,6 +207,15 @@
}
}
+export const copySprite = (sprite) => {
+ const copiedSprite = new PIXI.Sprite(sprite.texture);
+ initSprite(copiedSprite);
+ copiedSprite.position.set(sprite.position.x, sprite.position.y);
+ copiedSprite.scale.set(sprite.scale.x, sprite.scale.y);
+ copiedSprite.rotation = sprite.rotation;
+ return copiedSprite;
+}
+
export const markSprite = (sprite) => {
sprite.alpha = 0.5;
}
--
Gitblit v1.9.1