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