scroller: shift for top matters

Signed-off-by: Varun Patil <radialapps@gmail.com>
pull/672/head
Varun Patil 2023-05-21 17:38:31 -07:00
parent 2b8fec6a40
commit f9b0e873fb
3 changed files with 9 additions and 2 deletions

View File

@ -1,6 +1,7 @@
<template> <template>
<div <div
id="mobile-header" id="mobile-header"
class="timeline-scroller-gap"
:class="{ :class="{
visible: !isScrollDown, visible: !isScrollDown,
}" }"

View File

@ -299,7 +299,13 @@ export default defineComponent({
const extraY = this.recyclerBefore?.clientHeight ?? 0; const extraY = this.recyclerBefore?.clientHeight ?? 0;
// Exclude hover cursor height // Exclude hover cursor height
this.topPadding = (<HTMLSpanElement>this.$refs.hoverCursor)?.offsetHeight ?? 0; const hoverCursor = <HTMLSpanElement>this.$refs.hoverCursor;
this.topPadding = hoverCursor?.offsetHeight ?? 0;
// Add extra padding for any top elements
document.querySelectorAll('.timeline-scroller-gap').forEach((el) => {
this.topPadding += el.clientHeight;
});
// Start with the first tick. Walk over all rows counting the // Start with the first tick. Walk over all rows counting the
// y position. When you hit a row with the tick, update y and // y position. When you hit a row with the tick, update y and

View File

@ -1,5 +1,5 @@
<template> <template>
<div class="top-matter-container" v-if="currentmatter"> <div class="top-matter-container timeline-scroller-gap" v-if="currentmatter">
<component :is="currentmatter" /> <component :is="currentmatter" />
</div> </div>
</template> </template>