No reflow in recomputeSizes (handleResize)
parent
8bf5bc7ee1
commit
fd621f8211
|
@ -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();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue