Exclude topmatter from scroller height
parent
059e3ff010
commit
a26968cf91
|
@ -258,13 +258,21 @@ export default class Timeline extends Mixins(GlobalMixin, UserConfig) {
|
||||||
|
|
||||||
/** Handle window resize and initialization */
|
/** Handle window resize and initialization */
|
||||||
handleResize() {
|
handleResize() {
|
||||||
|
// 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;
|
||||||
let width = e.clientWidth;
|
let width = e.clientWidth;
|
||||||
|
|
||||||
|
// Scroller spans the container height
|
||||||
this.scrollerHeight = 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;
|
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
|
// Desktop scroller width
|
||||||
if (window.innerWidth > 768) {
|
if (window.innerWidth > 768) {
|
||||||
|
|
Loading…
Reference in New Issue