scroller: always adjust all ticks
parent
37d9307bab
commit
c758c69c93
|
@ -257,8 +257,8 @@ export default class ScrollerManager extends Mixins(GlobalMixin) {
|
|||
|
||||
// Start with the first tick. Walk over all rows counting the
|
||||
// y position. When you hit a row with the tick, update y and
|
||||
// top values and move to the next visible tick.
|
||||
let tickId = 0; // regardless of whether it's visible or not
|
||||
// top values and move to the next tick.
|
||||
let tickId = 0;
|
||||
let y = 0;
|
||||
|
||||
for (const row of this.rows) {
|
||||
|
@ -272,12 +272,7 @@ export default class ScrollerManager extends Mixins(GlobalMixin) {
|
|||
if (tick.dayId === row.dayId) {
|
||||
tick.y = y;
|
||||
this.setTickTop(tick);
|
||||
|
||||
// Get the next visible tick
|
||||
tickId++;
|
||||
while (tickId < this.ticks.length && !this.ticks[tickId].s) {
|
||||
tickId++;
|
||||
}
|
||||
}
|
||||
|
||||
y += row.size;
|
||||
|
|
|
@ -771,11 +771,11 @@ export default class Timeline extends Mixins(GlobalMixin, UserConfig) {
|
|||
// So just reflow the timeline here
|
||||
if (rowSizeDelta !== 0) {
|
||||
if (headRemoved) {
|
||||
// If the head was removed, that warrants a reflow
|
||||
// since months or years might disappear!
|
||||
// If the head was removed, we need a reflow,
|
||||
// or adjust isn't going to work right
|
||||
this.scrollerManager.reflow();
|
||||
} else {
|
||||
// Otherwise just adjust the visible ticks
|
||||
// Otherwise just adjust the ticks
|
||||
this.scrollerManager.adjust();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue