标记便签改用 postUpdate 更新,修复拖拽时闪烁/消失
This commit is contained in:
@@ -304,7 +304,9 @@ export class CesiumGlobe {
|
|||||||
this._markerLayer.appendChild(el);
|
this._markerLayer.appendChild(el);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.viewer.scene.postRender.addEventListener(() => this._updateMarkerLayer());
|
// 用 postUpdate(每帧都触发,即使 requestRenderMode 下不真正渲染)更新便签位置,
|
||||||
|
// 避免拖拽时 postRender 不触发导致的闪烁/消失。
|
||||||
|
this.viewer.scene.postUpdate.addEventListener(() => this._updateMarkerLayer());
|
||||||
}
|
}
|
||||||
|
|
||||||
// 每帧更新便签屏幕位置(相机移动/缩放/飞行时跟随)
|
// 每帧更新便签屏幕位置(相机移动/缩放/飞行时跟随)
|
||||||
|
|||||||
Reference in New Issue
Block a user