pinafore/routes/_components/virtualList/VirtualListFooter.html
Nolan Lawson 42be854521
upgrade to svelte 2.0 (#251)
* upgrade to svelte 2.0

* update svelte-loader to 2.9.0
2018-05-01 17:05:36 -07:00

28 lines
699 B
HTML

<div class="virtual-list-footer"
ref:node
style="transform: translateY({$heightWithoutFooter}px);" >
<svelte:component this={component} />
</div>
<style>
.virtual-list-footer {
position: absolute;
top: 0;
width: 100%;
}
</style>
<script>
import { virtualListStore } from './virtualListStore'
import { mark, stop } from '../../_utils/marks'
export default {
oncreate () {
requestAnimationFrame(() => {
mark('VirtualListFooter gBCR')
let rect = this.refs.node.getBoundingClientRect()
stop('VirtualListFooter gBCR')
this.store.setForRealm({footerHeight: rect.height})
})
},
store: () => virtualListStore
}
</script>