Fix measured values visibility in case of transparent or image background.
This commit is contained in:
parent
d296302a37
commit
6158280bd6
@ -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 ()
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user