From 4b964b70677d76955abced966273ceec797dd600 Mon Sep 17 00:00:00 2001 From: ywb <347742090@qq.com> Date: Sun, 17 May 2026 09:10:32 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20add=20map=20rotation=20controls=20(90?= =?UTF-8?q?=C2=B0=20left/right/reset)=20in=20map=20visualization?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- agv_app/setting.html | 29 ++++++++++++++++++++--------- agv_app/setting.js | 4 ++++ 2 files changed, 24 insertions(+), 9 deletions(-) diff --git a/agv_app/setting.html b/agv_app/setting.html index 1ed76f2..0bdd838 100644 --- a/agv_app/setting.html +++ b/agv_app/setting.html @@ -47,16 +47,27 @@

{% raw %}{{ mapMsg }}{% endraw %}

-

地图可视化

+
+

地图可视化

+
+ 旋转: + + + +
+
- - -
- -
+ +
+ + +
+ +
+
diff --git a/agv_app/setting.js b/agv_app/setting.js index 4bc8c6d..6908f49 100644 --- a/agv_app/setting.js +++ b/agv_app/setting.js @@ -16,6 +16,7 @@ createApp({ mapLoaded: false, mapImageUrl: '', mapMeta: null, + mapRotation: 0, // 点位 points: [], newPointName: '', @@ -110,6 +111,9 @@ createApp({ onMapError() { this.mapMsg = '❌ 地图图像加载失败' }, + rotateMap(deg) { + this.mapRotation = (this.mapRotation + deg) % 360 + }, getMapX(coords) { if (!coords || !this.mapMeta) return 50 const [x, y, yaw] = coords