forked from p15670423/monkey
Pass tests
This commit is contained in:
parent
0a7da90150
commit
d1a9d02224
|
@ -21,7 +21,7 @@ class MapPageComponent extends AuthComponent {
|
||||||
telemetryLastTimestamp: null,
|
telemetryLastTimestamp: null,
|
||||||
isScrolledUp: false,
|
isScrolledUp: false,
|
||||||
telemetryLines: 0,
|
telemetryLines: 0,
|
||||||
telemetryCurrentLine: 0,
|
telemetryCurrentLine: 0
|
||||||
};
|
};
|
||||||
this.telemConsole = React.createRef();
|
this.telemConsole = React.createRef();
|
||||||
this.handleScroll = this.handleScroll.bind(this);
|
this.handleScroll = this.handleScroll.bind(this);
|
||||||
|
@ -158,16 +158,16 @@ class MapPageComponent extends AuthComponent {
|
||||||
|
|
||||||
this.setState({
|
this.setState({
|
||||||
telemetryCurrentLine: parseInt(element.scrollTop/telemetryLineHeight)+1,
|
telemetryCurrentLine: parseInt(element.scrollTop/telemetryLineHeight)+1,
|
||||||
telemetryLines: parseInt(element.scrollHeight/telemetryLineHeight),
|
telemetryLines: parseInt(element.scrollHeight/telemetryLineHeight)
|
||||||
});
|
});
|
||||||
|
|
||||||
if (element.scrollTop < this.scrollTop) {
|
if (element.scrollTop < this.scrollTop) {
|
||||||
this.setState({
|
this.setState({
|
||||||
isScrolledUp: true,
|
isScrolledUp: true
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
this.setState({
|
this.setState({
|
||||||
isScrolledUp: false,
|
isScrolledUp: false
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue