From 8487c082f85aea83a03e81279f668687f5c8555d Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期六, 19 十月 2024 11:16:09 +0800
Subject: [PATCH] #

---
 zy-acs-flow/src/map/tool.js |   16 +++++++++++++---
 1 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/zy-acs-flow/src/map/tool.js b/zy-acs-flow/src/map/tool.js
index bac077c..e893eb6 100644
--- a/zy-acs-flow/src/map/tool.js
+++ b/zy-acs-flow/src/map/tool.js
@@ -4,7 +4,9 @@
     DEVICE_TYPE,
     DEVICE_Z_INDEX,
     AGV_STATUS_MODE,
+    DEVICE_SPRITE_TINT,
     DEVICE_SELECTED_EFFECT_PADDING,
+    DEVICE_SELECTED_EFFECT_COLOR,
 } from './constants';
 
 import shelf from '/map/shelf.svg';
@@ -102,8 +104,10 @@
         default:
             break;
     }
+    DEVICE_SPRITE_TINT[deviceType] != null && (sprite.tint = DEVICE_SPRITE_TINT[deviceType]);
+
     if (sprite && deviceType !== DEVICE_TYPE.AGV) {
-        // sprite.blendMode = PIXI.BLEND_MODES.MULTIPLY;
+        sprite.blendMode = PIXI.BLEND_MODES.MULTIPLY;
     }
     return sprite;
 }
@@ -340,7 +344,14 @@
     const maxDimension = Math.max(width, height);
     const radius = (maxDimension / 2) + (DEVICE_SELECTED_EFFECT_PADDING[sprite.data?.type] || 10);
 
-    const color = themeMode === 'light' ? '#40739e' : '#718093';
+    let color;
+    const spriteEffectColor = DEVICE_SELECTED_EFFECT_COLOR[sprite.data?.type];
+    if (spriteEffectColor) {
+        color = spriteEffectColor;
+    } else {
+        color = themeMode === 'light' ? '#747d8c' : '#718093';
+    }
+
     const alpha = 1;
 
     effectCircle = new PIXI.Graphics();
@@ -394,7 +405,6 @@
     if (!selectedSprite || !effectCircle) {
         return;
     }
-    // 鏇存柊鍦嗙殑浣嶇疆锛岀‘淇濊窡闅弒prite
     effectCircle.position.set(selectedSprite.x, selectedSprite.y);
 };
 

--
Gitblit v1.9.1