No reflow in recomputeSizes (handleResize)

old-stable24
Varun Patil 2022-10-20 17:41:26 -07:00
parent 8bf5bc7ee1
commit fd621f8211
1 changed files with 5 additions and 5 deletions

View File

@ -236,7 +236,7 @@ export default class Timeline extends Mixins(GlobalMixin, UserConfig) {
await this.$nextTick(); await this.$nextTick();
// Fit to window // Fit to window
this.handleResize(); this.recomputeSizes();
// Timeline recycler init // Timeline recycler init
(this.$refs.recycler as any).$el.addEventListener('scroll', this.scrollPositionChange, false); (this.$refs.recycler as any).$el.addEventListener('scroll', this.scrollPositionChange, false);
@ -280,13 +280,13 @@ export default class Timeline extends Mixins(GlobalMixin, UserConfig) {
clearTimeout(this.resizeTimer); clearTimeout(this.resizeTimer);
} }
this.resizeTimer = window.setTimeout(() => { this.resizeTimer = window.setTimeout(() => {
this.handleResize(); this.recomputeSizes();
this.resizeTimer = null; this.resizeTimer = null;
}, 300); }, 300);
} }
/** Handle window resize and initialization */ /** Recompute static sizes of containers */
handleResize() { recomputeSizes() {
// Size of outer container // Size of outer container
const e = this.$refs.container as Element; const e = this.$refs.container as Element;
let height = e.clientHeight; let height = e.clientHeight;
@ -324,7 +324,7 @@ export default class Timeline extends Mixins(GlobalMixin, UserConfig) {
} }
} }
this.scrollerManager.reflow(); this.scrollerManager.adjust();
} }
/** /**