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", "name": "bitfeed-client",
"version": "1.4.6", "version": "1.4.7",
"scripts": { "scripts": {
"build": "rollup -c", "build": "rollup -c",
"dev": "rollup -c -w", "dev": "rollup -c -w",

View File

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