Minor modifications.

This commit is contained in:
kovacsv 2021-12-11 12:17:49 +01:00
parent d152b64903
commit 42d61af160
2 changed files with 26 additions and 2 deletions

View File

@ -38,6 +38,18 @@ img
display: block;
}
ol, ul
{
padding: 0px 25px;
margin: 0px;
}
li
{
margin: 10px 0px;
line-height: 25px;
}
.only_on_model
{
display: var(--ov_only_on_model_display);

View File

@ -38,6 +38,8 @@ OV.SidebarMeasurePanel = class extends OV.SidebarPanel
this.helpSection = OV.AddDiv (this.contentDiv, 'ov_sidebar_section');
this.resultSection = OV.AddDiv (this.contentDiv, 'ov_sidebar_section');
this.helpSection.innerHTML = this.GetDefaultHelpText ();
}
UpdateMeasureTool (measureTool)
@ -51,9 +53,9 @@ OV.SidebarMeasurePanel = class extends OV.SidebarPanel
if (measureTool.IsActive ()) {
let markerCount = measureTool.GetMarkerCount ();
if (markerCount === 0) {
this.helpSection.innerHTML = 'Select a model point to start measure.';
this.helpSection.innerHTML = 'Click on a model point to start measure.';
} else if (markerCount === 1) {
this.helpSection.innerHTML = 'Select another model point to start measure.';
this.helpSection.innerHTML = 'Click on another model point to see the results.';
} else if (markerCount === 2) {
OV.ShowDomElement (this.helpSection, false);
OV.ShowDomElement (this.resultSection, true);
@ -87,9 +89,19 @@ OV.SidebarMeasurePanel = class extends OV.SidebarPanel
OV.AddDiv (this.resultSection, 'ov_sidebar_measure_value', facesAngleStr + '°');
}
} else {
this.helpSection.innerHTML = this.GetDefaultHelpText ();
}
}
GetDefaultHelpText ()
{
return `<ol>
<li>Activate measure mode with the button above.</li>
<li>Click two points in the model to see the results.</li>
</ol>`;
}
Clear ()
{