1
0
mirror of https://github.com/nolanlawson/pinafore synced 2025-02-15 02:40:46 +01:00

33 lines
774 B
HTML
Raw Normal View History

2018-01-21 16:07:11 -08:00
<div class="virtual-list-footer"
ref:node
style="transform: translateY({$heightWithoutFooter}px);" >
<svelte:component this={component} />
2018-01-21 16:07:11 -08:00
</div>
<style>
.virtual-list-footer {
position: absolute;
top: 0;
width: 100%;
}
</style>
<script>
2018-01-25 08:23:14 -08:00
import { virtualListStore } from './virtualListStore'
import { mark, stop } from '../../_utils/marks'
2018-01-21 16:07:11 -08:00
export default {
2018-04-19 21:38:01 -07:00
oncreate () {
requestAnimationFrame(() => {
let node = this.refs.node
if (!node) {
return
}
mark('VirtualListFooter gBCR')
let rect = node.getBoundingClientRect()
stop('VirtualListFooter gBCR')
this.store.setForRealm({ footerHeight: rect.height })
2018-01-21 16:07:11 -08:00
})
},
2018-04-19 21:38:01 -07:00
store: () => virtualListStore
2018-01-21 16:07:11 -08:00
}
</script>