forked from p15670423/monkey
Simplify code
This commit is contained in:
parent
d1a9d02224
commit
c22538fb08
|
@ -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() {
|
||||
|
|
Loading…
Reference in New Issue