From 58dc93f061c81ae345e9be2fa18699229d573f97 Mon Sep 17 00:00:00 2001 From: root Date: Tue, 28 Apr 2026 18:39:13 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E8=A7=86=E8=A7=92=E5=BC=80=E5=85=B3=E7=82=B9=E6=8C=89=E6=97=A0?= =?UTF-8?q?=E5=93=8D=E5=BA=94=EF=BC=8C=E5=B0=86=E6=B4=BB=E5=8A=A8=E9=93=BE?= =?UTF-8?q?=E6=8E=A5=E7=A7=BB=E8=87=B3=E6=98=9F=E5=9B=BE=E9=9D=A2=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 给 auto-view 标签增加独立点击事件,确保开关点击能正确切换 - 将活动从底部导航栏移到星图面板的自动视角旁边 - 底部导航只保留星图和设置 --- ui/static/graph.html | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/ui/static/graph.html b/ui/static/graph.html index ef698f2..b419940 100644 --- a/ui/static/graph.html +++ b/ui/static/graph.html @@ -328,13 +328,16 @@

节点: 0

边: 0

状态: 初始化中...

-

- 自动视角 - +

+ + 自动视角 + + + 活动

@@ -345,7 +348,6 @@
@@ -488,9 +490,16 @@ function init() { // 创建星空背景 // 自动视角开关事件 - document.getElementById("autoViewToggle").addEventListener("change", function() { + var autoViewToggle = document.getElementById("autoViewToggle"); + autoViewToggle.addEventListener("change", function() { autoViewEnabled = this.checked; }); + // 确保标签点击也能触发切换 + document.getElementById("autoViewLabel").addEventListener("click", function(e) { + // 防止事件冒泡,直接切换 + autoViewToggle.checked = !autoViewToggle.checked; + autoViewToggle.dispatchEvent(new Event('change')); + }); function createStarField() { const starCount = 3000;