Hide ticks below screen

pull/37/head
Varun Patil 2022-08-18 05:38:10 +00:00
parent b69371969e
commit dc3ea330b1
3 changed files with 6 additions and 5 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -206,7 +206,7 @@ export default {
let prevShow = -9999; let prevShow = -9999;
for (const [idx, tick] of this.timelineTicks.entries()) { for (const [idx, tick] of this.timelineTicks.entries()) {
// You can't see these anyway, why bother? // You can't see these anyway, why bother?
if (tick.topC < minGap) { if (tick.topC < minGap || tick.topC > this.timelineHeight - minGap) {
tick.s = false; tick.s = false;
continue; continue;
} }
@ -236,7 +236,8 @@ export default {
if (i < this.timelineTicks.length) { if (i < this.timelineTicks.length) {
// A labelled tick was found // A labelled tick was found
const nextLabelledTick = this.timelineTicks[i]; const nextLabelledTick = this.timelineTicks[i];
if (tick.topC + minGap > nextLabelledTick.topC) { if (tick.topC + minGap > nextLabelledTick.topC &&
nextLabelledTick.topC < this.timelineHeight - minGap) { // make sure this will be shown
tick.s = false; tick.s = false;
continue; continue;
} }