diff --git a/monkey/monkey_island/cc/ui/src/components/pages/MapPage.js b/monkey/monkey_island/cc/ui/src/components/pages/MapPage.js index 88c192437..f75091270 100644 --- a/monkey/monkey_island/cc/ui/src/components/pages/MapPage.js +++ b/monkey/monkey_island/cc/ui/src/components/pages/MapPage.js @@ -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) }); } diff --git a/monkey/monkey_island/cc/ui/src/styles/App.css b/monkey/monkey_island/cc/ui/src/styles/App.css index 7270a7c17..9719e79f5 100644 --- a/monkey/monkey_island/cc/ui/src/styles/App.css +++ b/monkey/monkey_island/cc/ui/src/styles/App.css @@ -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 {