From 06b0d3f8668a69585273c2f000d61ac318d7e161 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期六, 07 十二月 2024 09:19:47 +0800
Subject: [PATCH] #
---
zy-acs-flow/src/map/MapPage.jsx | 15 +++++++++------
1 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/zy-acs-flow/src/map/MapPage.jsx b/zy-acs-flow/src/map/MapPage.jsx
index ade2ea5..b777f45 100644
--- a/zy-acs-flow/src/map/MapPage.jsx
+++ b/zy-acs-flow/src/map/MapPage.jsx
@@ -8,7 +8,7 @@
useTheme,
Fab,
} from '@mui/material';
-import { MAP_MODE } from "./constants";
+import { MAP_MODE, MAP_DEFAULT_ROTATION } from "./constants";
import Player from './player';
import * as Tool from './tool';
import { NotificationProvider, useNotification } from './Notification';
@@ -86,7 +86,7 @@
}
}
- player.rotateMap(localStorage.getItem('mapRotation'));
+ player.rotateMap(localStorage.getItem('mapRotation') || Tool.rotationParseNum(MAP_DEFAULT_ROTATION));
setTimeout(() => {
notify.info(translate('page.map.welcome'));
player.adaptScreen();
@@ -182,6 +182,9 @@
const { mapX, mapY } = Tool.getRealPosition(x, y);
sprite.x = mapX;
sprite.y = mapY;
+
+ // sprite.scale.set(mapContainer.scale.x);
+ sprite.rotation = -mapContainer.rotation;
Tool.initSprite(sprite, type);
mapContainer.addChild(sprite);
@@ -415,9 +418,9 @@
}}
>
<AltRoute />
+ {translate('page.map.action.route')}
</Fab>
- <FakeFab
- />
+ <FakeFab />
</>
)}
<Fab
@@ -429,7 +432,7 @@
}}
>
<RotateRight />
- {/* {translate('page.map.action.adapt')} */}
+ {translate('page.map.action.rotate')}
</Fab>
<Fab
variant="extended"
@@ -440,7 +443,7 @@
}}
>
<FitScreen />
- {/* {translate('page.map.action.adapt')} */}
+ {translate('page.map.action.adapt')}
</Fab>
</Box>
</Box>
--
Gitblit v1.9.1