From 8a001b966c466463c9f4294e04d0b12e9c311fbd Mon Sep 17 00:00:00 2001 From: ChenX Date: Tue, 2 Apr 2019 17:40:34 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E6=B5=8B=E8=AF=95=E9=94=99?= =?UTF-8?q?=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- __test__/Geometry/EdgeGeometry.test.ts | 2 +- src/DatabaseServices/Entity.ts | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/__test__/Geometry/EdgeGeometry.test.ts b/__test__/Geometry/EdgeGeometry.test.ts index 40b07dd56..2e0a7a950 100644 --- a/__test__/Geometry/EdgeGeometry.test.ts +++ b/__test__/Geometry/EdgeGeometry.test.ts @@ -12,7 +12,7 @@ test('EdgeGeometry生成', () => let obj = br.GetDrawObjectFromRenderType(RenderType.Wireframe); - let line = obj.children[0] as Line; + let line = obj as Line; let geo = line.geometry; diff --git a/src/DatabaseServices/Entity.ts b/src/DatabaseServices/Entity.ts index 63830d107..e69a5c99f 100644 --- a/src/DatabaseServices/Entity.ts +++ b/src/DatabaseServices/Entity.ts @@ -251,7 +251,8 @@ export class Entity extends CADObject UpdateVisible() { - this._drawObject.visible = !this._isErase && this._Visible; + if (this._drawObject) + this._drawObject.visible = !this._isErase && this._Visible; } //#endregion