forked from p15670423/monkey
Change position of lines box to top-right corner of console
This commit is contained in:
parent
c22538fb08
commit
b4137587fc
|
@ -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)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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 {
|
||||||
|
|
Loading…
Reference in New Issue