解决二三维切换时出现的一些报错

This commit is contained in:
zh
2025-08-14 00:15:55 +08:00
parent a6fb1af6f9
commit d7ecd6d865
3 changed files with 7 additions and 4 deletions

View File

@ -1212,7 +1212,7 @@ class GroundSvg extends Base {
* @param {boolean} status=false 状态
*/
drag(status, cd) {
if (!this.#loaded) {
if (!this.#loaded || !this.sdk || !this.sdk.viewer) {
return
}
this.ismove = false
@ -2020,6 +2020,9 @@ class GroundSvg extends Base {
return
}
this.drag(false)
if(!this.sdk || !this.sdk.viewer) {
return
}
this.sdk.viewer.entities.remove(this.entity)
this.text && this.text.remove()
for (let i = this.entity.values.length; i >= 0; i--) {