forked from p15670423/monkey
UI: Fix current line number in telemetry overview window
This commit is contained in:
parent
d1ac07b7a4
commit
bb238de037
|
@ -59,7 +59,8 @@ const TelemetryLog = (props: { onStatusChange: Function }) => {
|
|||
let telemetryLineHeight = parseInt((telemetryStyle.lineHeight).replace('px', ''));
|
||||
|
||||
setIsScrolledUp((element.scrollTop < scrollTop));
|
||||
setTelemetryCurrentLine(Math.trunc(element.scrollTop / telemetryLineHeight) + 1);
|
||||
// Zooming in or out doesn't change the number of lines that are visible at once i.e. 5.
|
||||
setTelemetryCurrentLine(Math.trunc(element.scrollTop / telemetryLineHeight) + 5);
|
||||
setTelemetryLines(Math.trunc(element.scrollHeight / telemetryLineHeight));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue