From 213de676b386af4a195df899c23d057d889095d1 Mon Sep 17 00:00:00 2001 From: luxiaotao1123 <t1341870251@163.com> Date: 星期二, 22 十月 2024 16:13:25 +0800 Subject: [PATCH] # --- zy-acs-flow/src/map/insight/shelf/ShelfThree.js | 10 +++++++--- 1 files changed, 7 insertions(+), 3 deletions(-) diff --git a/zy-acs-flow/src/map/insight/shelf/ShelfThree.js b/zy-acs-flow/src/map/insight/shelf/ShelfThree.js index 01b60c0..c42cf00 100644 --- a/zy-acs-flow/src/map/insight/shelf/ShelfThree.js +++ b/zy-acs-flow/src/map/insight/shelf/ShelfThree.js @@ -207,7 +207,7 @@ height * cameraPosScale, height * cameraPosScale ); - this.controls.target = new THREE.Vector3(0, maxHeight * 0.53, 0); + this.controls.target = new THREE.Vector3(0, maxHeight * 0.5, 0); } destroy = () => { @@ -241,8 +241,12 @@ this.dom?.removeEventListener("click", this.handleClickEvent); this.camera = null; this.objects = []; - while (this.dom?.firstChild) { - this.dom.removeChild(this.dom.firstChild); + if (this.dom) { + while (this.dom.firstChild) { + if (this.dom.contains(this.dom.firstChild)) { + this.dom.removeChild(this.dom.firstChild); + } + } } } -- Gitblit v1.9.1