Change position of lines box to top-right corner of console

This commit is contained in:
Shreya 2020-03-18 12:57:20 +05:30
parent c22538fb08
commit b4137587fc
2 changed files with 12 additions and 6 deletions

View File

@ -153,13 +153,13 @@ class MapPageComponent extends AuthComponent {
handleScroll(e) {
let element = e.target;
let telemetryStyle = window.getComputedStyle(element)
let telemetryLineHeight = parseInt((telemetryStyle.lineHeight).replace('px', ''))
let telemetryStyle = window.getComputedStyle(element);
let telemetryLineHeight = parseInt((telemetryStyle.lineHeight).replace('px', ''));
this.setState({
isScrolledUp: !!(element.scrollTop < this.scrollTop),
telemetryCurrentLine: parseInt(element.scrollTop/telemetryLineHeight)+1,
telemetryLines: parseInt(element.scrollHeight/telemetryLineHeight)
isScrolledUp: (element.scrollTop < this.scrollTop),
telemetryCurrentLine: Math.trunc(element.scrollTop/telemetryLineHeight)+1,
telemetryLines: Math.trunc(element.scrollHeight/telemetryLineHeight)
});
}

View File

@ -325,8 +325,14 @@ body {
}
.telemetry-lines {
z-index: 3;
position: absolute;
right: 0;
bottom: 103px;
right: 20px;
background: black;
border-radius: 2px;
padding: 1px;
color: white;
}
.map-legend {