修复显示错误

pull/309/MERGE
ChenX 5 years ago
parent 04dae9e8fb
commit d378d109d3

@ -14,5 +14,8 @@ export function DisposeThreeObj(obj: Object3D)
//@ts-ignores
o.geometry.dispose();
});
for (let c of obj.children)
c.dispatchEvent({ type: 'removed' });
obj.children.length = 0;
}

@ -326,12 +326,8 @@ export class Entity extends CADObject
if (this._drawObject)
{
this._drawObject.visible = this.IsVisible;
if (this._drawObject.children.length === 0 && this.IsVisible)
{
let obj = this.GetDrawObjectFromRenderType(userConfig.RenderType);
if (obj) this._drawObject.add(obj);
this._drawObject.userData.Entity = this;
}
if (this.IsVisible)
this.UpdateRenderType(userConfig.RenderType);
}
}

Loading…
Cancel
Save