Merge branch 'master' of https://github.com/ZXY101/z-reader into jidoujisho-testing

This commit is contained in:
ZXY101
2024-02-08 16:28:54 +02:00
2 changed files with 7 additions and 16 deletions

View File

@@ -1,6 +1,6 @@
<script lang="ts"> <script lang="ts">
import type { Page } from '$lib/types'; import type { Page } from '$lib/types';
import { afterUpdate, onMount } from 'svelte'; import { afterUpdate, onMount, onDestroy } from 'svelte';
import TextBoxes from './TextBoxes.svelte'; import TextBoxes from './TextBoxes.svelte';
import { zoomDefault } from '$lib/panzoom'; import { zoomDefault } from '$lib/panzoom';
@@ -14,6 +14,12 @@
onMount(() => { onMount(() => {
legacy = document.getElementById('popupAbout'); legacy = document.getElementById('popupAbout');
zoomDefault(); zoomDefault();
return () => {
setTimeout(() => {
zoomDefault();
}, 10);
};
}); });
$: { $: {

View File

@@ -202,21 +202,6 @@
} }
} }
} }
let shouldUpdate = false;
function handleUpdate() {
shouldUpdate = true;
}
$: volumeSettings.singlePageView && handleUpdate();
afterUpdate(() => {
if (shouldUpdate) {
shouldUpdate = false;
zoomDefault();
}
});
</script> </script>
<svelte:window <svelte:window