Fix measured values visibility in case of transparent or image background.

This commit is contained in:
kovacsv 2022-06-25 19:55:03 +02:00
parent d296302a37
commit 6158280bd6
2 changed files with 10 additions and 9 deletions

View File

@ -247,6 +247,7 @@ export class MeasureTool
AddValue (this.panel, 'measure_angle', 'Angle of faces', degreeValue.toFixed (1) + '\xB0');
}
}
this.Resize ();
}
Resize ()
@ -255,10 +256,12 @@ export class MeasureTool
return;
}
let canvas = this.viewer.GetCanvas ();
let rect = canvas.getBoundingClientRect ();
this.panel.style.left = (rect.left + 1) + 'px';
this.panel.style.top = (rect.top + 1) + 'px';
this.panel.style.width = (rect.right - rect.left - 2) + 'px';
let canvasRect = canvas.getBoundingClientRect ();
let panelRect = this.panel.getBoundingClientRect ();
let canvasWidth = canvasRect.right - canvasRect.left;
let panelWidth = panelRect.right - panelRect.left;
this.panel.style.left = (canvasRect.left + (canvasWidth - panelWidth) / 2) + 'px';
this.panel.style.top = (canvasRect.top + 10) + 'px';
}
ClearMarkers ()

View File

@ -273,12 +273,9 @@ div.ov_bottom_floating_panel div.ov_floating_panel_button
div.ov_measure_panel
{
padding: 10px;
box-sizing: border-box;
display: flex;
flex-wrap: wrap;
justify-content: center;
padding: 6px 15px;
position: absolute;
border-radius: 30px;
left : 0px;
top : 0px;
}
@ -286,6 +283,7 @@ div.ov_measure_panel
div.ov_measure_panel div.ov_svg_icon
{
color: inherit;
margin-bottom: 2px;
}
div.ov_measure_panel div.ov_measure_value