Minor modification.

This commit is contained in:
kovacsv 2021-12-02 13:43:40 +01:00
parent 14139c2597
commit 27984580f7
3 changed files with 10 additions and 5 deletions

View File

@ -59,9 +59,9 @@ OV.Sidebar = class
});
}
Update (model)
UpdateSettings (hasDefaultMaterial)
{
this.settingsPanel.Update (model);
this.settingsPanel.UpdateSettings (hasDefaultMaterial);
}
Resize (height)

View File

@ -253,9 +253,8 @@ OV.SettingsSidebarPanel = class extends OV.SidebarPanel
this.AddResetToDefaultsButton ();
}
Update (model)
UpdateSettings (hasDefaultMaterial)
{
let hasDefaultMaterial = OV.HasDefaultMaterial (model);
if (!hasDefaultMaterial) {
OV.ShowDomElement (this.defaultColorInput.warning);
} else {

View File

@ -145,7 +145,7 @@ OV.Website = class
this.viewer.SetMainObject (threeObject);
this.viewer.SetUpVector (importResult.upVector, false);
this.navigator.FillTree (importResult);
this.sidebar.Update (this.model);
this.UpdateSidebar ();
this.FitModelToWindow (true);
}
@ -289,6 +289,12 @@ OV.Website = class
this.viewer.FitSphereToWindow (boundingSphere, true);
}
UpdateSidebar ()
{
let hasDefaultMaterial = OV.HasDefaultMaterial (this.model);
this.sidebar.UpdateSettings (hasDefaultMaterial);
}
UpdateMeshesVisibility ()
{
this.viewer.SetMeshesVisibility ((meshUserData) => {