From 199ef8f89204c905ae247df2ee5aed294ddf476f Mon Sep 17 00:00:00 2001 From: fukunee Date: Sat, 19 Sep 2026 13:31:22 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A0=87=E8=AE=B0=E4=BE=BF=E7=AD=BE=E6=94=B9?= =?UTF-8?q?=E7=94=A8=20postUpdate=20=E6=9B=B4=E6=96=B0=EF=BC=8C=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E6=8B=96=E6=8B=BD=E6=97=B6=E9=97=AA=E7=83=81/?= =?UTF-8?q?=E6=B6=88=E5=A4=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/scene/CesiumGlobe.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/scene/CesiumGlobe.js b/src/scene/CesiumGlobe.js index 597f721..ad3e181 100644 --- a/src/scene/CesiumGlobe.js +++ b/src/scene/CesiumGlobe.js @@ -304,7 +304,9 @@ export class CesiumGlobe { this._markerLayer.appendChild(el); } - this.viewer.scene.postRender.addEventListener(() => this._updateMarkerLayer()); + // 用 postUpdate(每帧都触发,即使 requestRenderMode 下不真正渲染)更新便签位置, + // 避免拖拽时 postRender 不触发导致的闪烁/消失。 + this.viewer.scene.postUpdate.addEventListener(() => this._updateMarkerLayer()); } // 每帧更新便签屏幕位置(相机移动/缩放/飞行时跟随)