Simplify code

This commit is contained in:
Shreya 2020-03-13 21:14:28 +05:30
parent d1a9d02224
commit c22538fb08
1 changed files with 1 additions and 10 deletions

View File

@ -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() {