From a8cef4b919a7f5d9fe180ac9c62b1a894c9be7c1 Mon Sep 17 00:00:00 2001
From: Junjie <fallin.jie@qq.com>
Date: 星期三, 11 三月 2026 08:47:36 +0800
Subject: [PATCH] #

---
 src/main/webapp/components/MapCanvas.js  |   18 ++++++++++++++----
 src/main/webapp/views/watch/console.html |    2 +-
 src/main/webapp/views/index.html         |   10 ++++++++++
 3 files changed, 25 insertions(+), 5 deletions(-)

diff --git a/src/main/webapp/components/MapCanvas.js b/src/main/webapp/components/MapCanvas.js
index b5ced58..5057776 100644
--- a/src/main/webapp/components/MapCanvas.js
+++ b/src/main/webapp/components/MapCanvas.js
@@ -119,6 +119,7 @@
       },
       shelfTooltipMinScale: 0.4,
       containerResizeObserver: null,
+      resizeDebounceTimer: null,
       timer: null,
       adjustLabelTimer: null,
       isSwitchingFloor: false,
@@ -173,10 +174,11 @@
 
     if (this.hoverRaf) { cancelAnimationFrame(this.hoverRaf); this.hoverRaf = null; }
     if (this.shelfCullRaf) { cancelAnimationFrame(this.shelfCullRaf); this.shelfCullRaf = null; }
+    if (this.resizeDebounceTimer) { clearTimeout(this.resizeDebounceTimer); this.resizeDebounceTimer = null; }
     if (window.gsap && this.pixiApp && this.pixiApp.stage) { window.gsap.killTweensOf(this.pixiApp.stage.position); }
     if (this.pixiApp) { this.pixiApp.destroy(true, { children: true }); }
     if (this.containerResizeObserver) { this.containerResizeObserver.disconnect(); this.containerResizeObserver = null; }
-    window.removeEventListener('resize', this.resizeToContainer);
+    window.removeEventListener('resize', this.scheduleResizeToContainer);
     if (this.wsReconnectTimer) { clearTimeout(this.wsReconnectTimer); this.wsReconnectTimer = null; }
     if (this.ws && (this.ws.readyState === WebSocket.OPEN || this.ws.readyState === WebSocket.CONNECTING)) { try { this.ws.close(); } catch (e) {} }
   },
@@ -377,7 +379,7 @@
       this.pixiApp.view.style.height = '100%';
       this.pixiApp.view.style.display = 'block';
       this.resizeToContainer();
-      window.addEventListener('resize', this.resizeToContainer);
+      window.addEventListener('resize', this.scheduleResizeToContainer);
       this.graphicsCrnTrack = this.createTrackTexture(25, 25, 10);
       this.graphicsRgvTrack = this.createTrackTexture(25, 25, 10);
       this.objectsContainer = new PIXI.Container();
@@ -490,9 +492,18 @@
     startContainerResizeObserve() {
       if (typeof ResizeObserver === 'undefined' || !this.$el) { return; }
       this.containerResizeObserver = new ResizeObserver(() => {
-        this.resizeToContainer();
+        this.scheduleResizeToContainer();
       });
       this.containerResizeObserver.observe(this.$el);
+    },
+    scheduleResizeToContainer() {
+      if (this.resizeDebounceTimer) {
+        clearTimeout(this.resizeDebounceTimer);
+      }
+      this.resizeDebounceTimer = setTimeout(() => {
+        this.resizeDebounceTimer = null;
+        this.resizeToContainer();
+      }, 80);
     },
     getViewportSize() {
       if (!this.pixiApp || !this.pixiApp.renderer) { return { width: 0, height: 0 }; }
@@ -2646,7 +2657,6 @@
     }
   }
 });
-
 
 
 
diff --git a/src/main/webapp/views/index.html b/src/main/webapp/views/index.html
index e6fd9eb..c6dfc9a 100644
--- a/src/main/webapp/views/index.html
+++ b/src/main/webapp/views/index.html
@@ -50,6 +50,8 @@
       will-change: width;
       transition: width 0.22s cubic-bezier(0.22, 1, 0.36, 1),
       box-shadow 0.22s ease;
+      -webkit-user-select: none;
+      user-select: none;
     }
 
     .layout-aside.is-animating {
@@ -124,6 +126,8 @@
       border: 1px solid rgba(255, 255, 255, 0.10);
       background: rgba(255, 255, 255, 0.08);
       color: #fff;
+      -webkit-user-select: text;
+      user-select: text;
     }
 
     .aside-search .el-input__inner::placeholder {
@@ -415,6 +419,8 @@
       background: #fff;
       border-bottom: 1px solid #e8edf5;
       box-sizing: border-box;
+      -webkit-user-select: none;
+      user-select: none;
     }
 
     .page-tabs {
@@ -433,6 +439,8 @@
     .page-tabs .el-tabs__item {
       height: 38px;
       line-height: 38px;
+      -webkit-user-select: none;
+      user-select: none;
     }
 
     .tabs-tools {
@@ -441,6 +449,8 @@
       gap: 8px;
       padding-bottom: 6px;
       flex-shrink: 0;
+      -webkit-user-select: none;
+      user-select: none;
     }
 
     .content-main {
diff --git a/src/main/webapp/views/watch/console.html b/src/main/webapp/views/watch/console.html
index 5abc253..63210b0 100644
--- a/src/main/webapp/views/watch/console.html
+++ b/src/main/webapp/views/watch/console.html
@@ -553,7 +553,7 @@
 		<script src="../../components/WatchDualCrnCard.js"></script>
 		<script src="../../components/DevpCard.js"></script>
 		<script src="../../components/WatchRgvCard.js"></script>
-		<script src="../../components/MapCanvas.js"></script>
+		<script src="../../components/MapCanvas.js?v=20260311_resize_debounce1"></script>
 		<script>
 			let ws;
 			var app = new Vue({

--
Gitblit v1.9.1