gipy: min height

pull/2994/head
frederic wagner 2023-08-23 08:00:05 +02:00
parent 7baa0d2173
commit 463bba4996
1 changed files with 6 additions and 0 deletions

View File

@ -1043,6 +1043,12 @@ class Status {
max_height = Math.max(max_height, height);
min_height = Math.min(min_height, height);
}
// we'll set the displayed height to a minimum value of 100m
// if we don't, then we'll see too much noise
if (max_height - min_height < 100) {
min_height = min_height - 10;
max_height = min_height + 110;
}
let displayed_height = max_height - min_height;
let height_per_pixel = displayed_height / graph_height;