From c768e0f65fbd3787ad7a548b7f6df9975b0ca021 Mon Sep 17 00:00:00 2001 From: ChenX Date: Wed, 12 May 2021 17:35:13 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BC=80=E5=8F=91:=E7=AE=80=E5=8C=96=E4=BB=A3?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/GraphicsSystem/Viewer.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/GraphicsSystem/Viewer.ts b/src/GraphicsSystem/Viewer.ts index 66184a8f1..0caab3fc9 100644 --- a/src/GraphicsSystem/Viewer.ts +++ b/src/GraphicsSystem/Viewer.ts @@ -478,9 +478,8 @@ export class Viewer } let box = new Box3(); - ens.reduce((b, e) => b.union(e.BoundingBox), box); - if (box.isEmpty()) - return; + for (let e of ens) box.union(e.BoundingBox); + if (box.isEmpty()) return; this.CameraCtrl.ZoomExtensBox3(box); this.CameraCtrl.Zoom(1.2); this.UpdateRender();