关闭自动推演时候清除脉冲实体

This commit is contained in:
wzy-warehouse
2026-06-16 10:03:46 +08:00
parent 2e2cbcb18d
commit ec15cd194b
2 changed files with 18 additions and 15 deletions
@@ -34,6 +34,9 @@ export const useRightHandle = () => {
// 隐藏步骤条 // 隐藏步骤条
statusStore.uiComponents.stepBar.show = false; statusStore.uiComponents.stepBar.show = false;
// 删除脉冲
CesiumUtilsSingleton.removeAllPulses();
} }
}; };
+11 -11
View File
@@ -552,7 +552,7 @@ export class CesiumUtils {
this.clearAllPrimitives(clearType); this.clearAllPrimitives(clearType);
this.clearAllLayers(clearType); this.clearAllLayers(clearType);
this.clearAllGeoJsonLayers(clearType); this.clearAllGeoJsonLayers(clearType);
this.#removeAllPulses(); this.removeAllPulses();
} }
// ===================== getter 和 setter函数 ===================== // ===================== getter 和 setter函数 =====================
@@ -637,7 +637,7 @@ export class CesiumUtils {
if (!viewer) return; if (!viewer) return;
// 移除已有脉冲 // 移除已有脉冲
this.#removeAllPulses(); this.removeAllPulses();
// 生成圆形贴图 // 生成圆形贴图
if (!this.#pulseCircleImage) { if (!this.#pulseCircleImage) {
@@ -665,6 +665,15 @@ export class CesiumUtils {
} }
} }
/**
* 移除所有脉冲实体
*/
removeAllPulses(): void {
for (const key of Object.keys(this.#pulseMap)) {
this.#deletePulseEntity(key);
}
}
// ===================== 私有方法 ===================== // ===================== 私有方法 =====================
/** /**
@@ -751,15 +760,6 @@ export class CesiumUtils {
}); });
} }
/**
* 移除所有脉冲实体
*/
#removeAllPulses(): void {
for (const key of Object.keys(this.#pulseMap)) {
this.#deletePulseEntity(key);
}
}
/** /**
* 删除单个脉冲实体 * 删除单个脉冲实体
* @param key - 脉冲映射 key * @param key - 脉冲映射 key