Reset measure ui when a new model is loaded.

This commit is contained in:
kovacsv 2021-12-11 12:07:12 +01:00
parent 9b3fc02357
commit d152b64903
2 changed files with 9 additions and 2 deletions

View File

@ -99,6 +99,8 @@ OV.MeasureTool = class
coneGeometry.rotateX (-Math.PI / 2);
let coneMaterial = this.viewer.CreateHighlightMaterial (this.highlightColor);
coneMaterial.opacity = 0.6;
coneMaterial.transparent = true;
let cone = new THREE.Mesh (coneGeometry, coneMaterial);
let faceNormal = this.GetFaceWorldNormal (intersection);

View File

@ -133,12 +133,17 @@ OV.Website = class
ClearModel ()
{
this.HidePopups ();
this.model = null;
this.parameters.fileNameDiv.innerHTML = '';
this.measureTool.Clear ();
this.viewer.Clear ();
this.parameters.fileNameDiv.innerHTML = '';
this.navigator.Clear ();
this.sidebar.Clear ();
this.measureTool.Clear ();
this.sidebar.UpdateMeasureTool (this.measureTool);
}
OnModelLoaded (importResult, threeObject)