Don't show the settings/details icons on the landing page #153
This commit is contained in:
parent
6dacca19a7
commit
4ebcddc040
@ -1,3 +1,8 @@
|
||||
:root
|
||||
{
|
||||
--ov_only_on_model_display: inherit;
|
||||
}
|
||||
|
||||
@font-face
|
||||
{
|
||||
font-family: Quicksand;
|
||||
@ -28,6 +33,11 @@ img
|
||||
display: block;
|
||||
}
|
||||
|
||||
.only_on_model
|
||||
{
|
||||
display: var(--ov_only_on_model_display);
|
||||
}
|
||||
|
||||
@media (hover)
|
||||
{
|
||||
|
||||
|
||||
@ -18,29 +18,17 @@ OV.GetMaterialName = function (originalName)
|
||||
|
||||
OV.IsHoverEnabled = function ()
|
||||
{
|
||||
if (window.matchMedia ('(hover : hover)').matches) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
return window.matchMedia ('(hover: hover)').matches;
|
||||
};
|
||||
|
||||
OV.IsSmallWidth = function ()
|
||||
{
|
||||
if (window.matchMedia ('(max-width : 700px)').matches) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
return window.matchMedia ('(max-width: 700px)').matches;
|
||||
};
|
||||
|
||||
OV.IsSmallHeight = function ()
|
||||
{
|
||||
if (window.matchMedia ('(max-height : 700px)').matches) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
return window.matchMedia ('(max-height: 700px)').matches;
|
||||
};
|
||||
|
||||
OV.InstallTooltip = function (item, text)
|
||||
|
||||
@ -84,18 +84,33 @@ OV.Website = class
|
||||
this.viewer.Resize (contentWidth, contentHeight);
|
||||
}
|
||||
|
||||
HasLoadedModel ()
|
||||
{
|
||||
return this.model !== null;
|
||||
}
|
||||
|
||||
SetUIState (uiState)
|
||||
{
|
||||
function ShowOnlyOnModelElements (show)
|
||||
{
|
||||
let root = document.querySelector (':root');
|
||||
root.style.setProperty ('--ov_only_on_model_display', show ? 'inherit' : 'none');
|
||||
}
|
||||
|
||||
if (uiState === OV.WebsiteUIState.Intro) {
|
||||
this.parameters.introDiv.show ();
|
||||
this.parameters.mainDiv.hide ();
|
||||
ShowOnlyOnModelElements (false);
|
||||
} else if (uiState === OV.WebsiteUIState.Model) {
|
||||
this.parameters.introDiv.hide ();
|
||||
this.parameters.mainDiv.show ();
|
||||
ShowOnlyOnModelElements (true);
|
||||
} else if (uiState === OV.WebsiteUIState.Loading) {
|
||||
this.parameters.introDiv.hide ();
|
||||
this.parameters.mainDiv.hide ();
|
||||
ShowOnlyOnModelElements (false);
|
||||
}
|
||||
|
||||
this.Resize ();
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user