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) { handleScroll(e) {
let element = e.target; let element = e.target;
let telemetryStyle = window.getComputedStyle(element) let telemetryStyle = window.getComputedStyle(element);
let telemetryLineHeight = parseInt((telemetryStyle.lineHeight).replace('px', '')) let telemetryLineHeight = parseInt((telemetryStyle.lineHeight).replace('px', ''));
this.setState({ this.setState({
isScrolledUp: !!(element.scrollTop < this.scrollTop), isScrolledUp: (element.scrollTop < this.scrollTop),
telemetryCurrentLine: parseInt(element.scrollTop/telemetryLineHeight)+1, telemetryCurrentLine: Math.trunc(element.scrollTop/telemetryLineHeight)+1,
telemetryLines: parseInt(element.scrollHeight/telemetryLineHeight) telemetryLines: Math.trunc(element.scrollHeight/telemetryLineHeight)
}); });
} }

View File

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