#
luxiaotao1123
2024-10-11 a908604f5aa2da9921cd99c12a6fa422d5893f4a
zy-acs-flow/src/map/MapPage.jsx
@@ -60,7 +60,7 @@
            Tool.setMapContainer(player.mapContainer);
            Tool.setThemeMode(themeMode);
            Http.setNotify(notify);
            websocket = new WebSocketClient('/ws/map/websocket');
            // websocket = new WebSocketClient('/ws/map/websocket');
            await Http.fetchMapData(0);
            // websocket.connect();
@@ -81,7 +81,7 @@
        handleResize();
        window.addEventListener('resize', handleResize);
        notify('Welcome to Rcs', 'info');
        notify.info('Welcome to Rcs');
        return () => {
            if (websocket) {
@@ -105,6 +105,7 @@
        switch (mode) {
            case MapMode.OBSERVER_MODE:
                player.hideGridLines();
                player.hideStarryBackground();
                player.activateMapMultiSelect((selectedSprites, restartFn) => {
                    console.log(selectedSprites);
@@ -113,6 +114,7 @@
                break
            case MapMode.MOVABLE_MODE:
                player.showGridLines();
                player.hideStarryBackground();
                player.activateMapMultiSelect((selectedSprites, restartFn) => {
                    Tool.spriteListBeMovable(selectedSprites, () => {
@@ -122,6 +124,7 @@
                break
            case MapMode.SETTINGS_MODE:
                player.hideGridLines();
                player.showStarryBackground(); // 0x2f68ac
                player.activateMapMultiSelect((selectedSprites, restartFn) => {
                    console.log(selectedSprites);
@@ -310,6 +313,7 @@
                onCancel={() => {
                    setInsightVisible(false);
                }}
                width={378}
            />
            <Device
@@ -324,8 +328,12 @@
            <Settings
                open={settingsVisible}
                onCancel={() => {
                    setSpriteSettings(null);
                    setSettingsVisible(false);
                }}
                sprite={spriteSettings}
                setSpriteSettings={setSpriteSettings}
                width={570}
            />
        </Box>