From 475fceb864b4c5d7fb9f47720b0918ba7c96e08a Mon Sep 17 00:00:00 2001 From: luxiaotao1123 <t1341870251@163.com> Date: 星期三, 09 十月 2024 13:19:13 +0800 Subject: [PATCH] # --- zy-acs-flow/src/map/MapPage.jsx | 13 +++++++++---- 1 files changed, 9 insertions(+), 4 deletions(-) diff --git a/zy-acs-flow/src/map/MapPage.jsx b/zy-acs-flow/src/map/MapPage.jsx index 01df102..e7dd074 100644 --- a/zy-acs-flow/src/map/MapPage.jsx +++ b/zy-acs-flow/src/map/MapPage.jsx @@ -76,10 +76,13 @@ switch (mode) { case MapMode.OBSERVER_MODE: setDeviceVisible(false); + player.hideGridLines(); break case MapMode.MOVABLE_MODE: + player.showGridLines(); break case MapMode.SETTINGS_MODE: + player.hideGridLines(); setDeviceVisible(false); break default: @@ -95,13 +98,15 @@ }, [mode]); const onDrop = (sprite, type, x, y) => { + console.log(sprite, type, x, y); + const { mapX, mapY } = Tool.getRealPosition(x, y); sprite.x = mapX; sprite.y = mapY; - // Utils.initSprite(sprite, type); - // mapContainer.addChild(sprite); - // Utils.beMovable(sprite); + Tool.initSprite(sprite, type); + mapContainer.addChild(sprite); + Tool.beMovable(sprite); }; const actions = [ @@ -168,7 +173,7 @@ sx={{ mr: 1 }} onClick={() => setDeviceVisible(!deviceVisible)} > - 娣诲姞妯″瀷 + {translate('page.map.devices.title')} </Button> </> )} -- Gitblit v1.9.1