Exclude topmatter from scroller height

cache
Varun Patil 2022-10-15 11:52:34 -07:00
parent 3c99410738
commit 93779c2cbe
1 changed files with 9 additions and 1 deletions

View File

@ -258,13 +258,21 @@ export default class Timeline extends Mixins(GlobalMixin, UserConfig) {
/** Handle window resize and initialization */
handleResize() {
// Size of outer container
const e = this.$refs.container as Element;
let height = e.clientHeight;
let width = e.clientWidth;
// Scroller spans the container height
this.scrollerHeight = height;
// Static top matter to exclude from recycler height
const topmatter = this.$refs.topmatter as any;
const tmHeight = topmatter.$el?.clientHeight || 0;
// Recycler height
const recycler = this.$refs.recycler as any;
recycler.$el.style.height = (height - 4) + 'px';
recycler.$el.style.height = (height - tmHeight - 4) + 'px';
// Desktop scroller width
if (window.innerWidth > 768) {