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 d92030437..88c192437 100644 --- a/monkey/monkey_island/cc/ui/src/components/pages/MapPage.js +++ b/monkey/monkey_island/cc/ui/src/components/pages/MapPage.js @@ -157,19 +157,10 @@ class MapPageComponent extends AuthComponent { 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) }); - - if (element.scrollTop < this.scrollTop) { - this.setState({ - isScrolledUp: true - }); - } else { - this.setState({ - isScrolledUp: false - }); - } } renderTelemetryConsole() {