Final resize/loading tweaks

This commit is contained in:
Mononaut 2021-04-26 15:09:55 -06:00
parent 8df42e5e4b
commit f7e7deb373
2 changed files with 11 additions and 8 deletions

View File

@ -1,6 +1,6 @@
{
"name": "bitfeed-client",
"version": "1.4.6",
"version": "1.4.7",
"scripts": {
"build": "rollup -c",
"dev": "rollup -c -w",

View File

@ -58,12 +58,15 @@
})
function resize () {
width = window.innerWidth - 20
height = window.innerHeight - 20
txController.resize({
width,
height
})
if (width !== window.innerWidth - 20 || height !== window.innerHeight - 20) {
// don't force resize unless the viewport has actually changed
width = window.innerWidth - 20
height = window.innerHeight - 20
txController.resize({
width,
height
})
}
}
function hideBlock () {
@ -354,7 +357,7 @@
}
</style>
<svelte:window on:resize={resize} on:click={pointerLeave} />
<svelte:window on:resize={resize} on:load={resize} on:click={pointerLeave} />
<!-- <svelte:window on:resize={resize} on:click={pointerMove} /> -->
<div class="tx-area" class:light-mode={!$settings.darkMode}>