From 2d0b1bb3b3224d9cf0195b56415af6f86096778c Mon Sep 17 00:00:00 2001 From: luxiaotao1123 <t1341870251@163.com> Date: 星期三, 09 十月 2024 16:48:29 +0800 Subject: [PATCH] # --- zy-acs-flow/src/map/MapPage.jsx | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/zy-acs-flow/src/map/MapPage.jsx b/zy-acs-flow/src/map/MapPage.jsx index c67fcf4..2093fdc 100644 --- a/zy-acs-flow/src/map/MapPage.jsx +++ b/zy-acs-flow/src/map/MapPage.jsx @@ -23,6 +23,7 @@ import * as Tool from './tool'; import { NotificationProvider, useNotification } from './Notification'; import Device from "./Device"; +import * as Http from './http'; let player; @@ -49,6 +50,9 @@ setMapContainer(player.mapContainer); Tool.setApp(player.app); Tool.setMapContainer(player.mapContainer); + Http.setNotify(notify); + + await Http.fetchMapData(0); } initialize(); @@ -110,11 +114,9 @@ return } switchMode(mode); - }, [mode]); + }, [mode, mapContainer]); 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; -- Gitblit v1.9.1