Hide top ticks

pull/37/head
Varun Patil 2022-08-18 02:39:55 +00:00
parent 895baa21ff
commit cf256d2db7
1 changed files with 6 additions and 0 deletions

View File

@ -205,6 +205,12 @@ export default {
const minGap = parseFloat(getComputedStyle(this.$refs.cursorSt).fontSize) + 2;
let prevShow = -9999;
for (const [idx, tick] of this.timelineTicks.entries()) {
// You can't see these anyway, why bother?
if (tick.topC < minGap) {
tick.s = false;
continue;
}
// Will overlap with the previous tick. Skip anyway.
if (tick.topC - prevShow < minGap) {
tick.s = false;