This commit is contained in:
ZXY101
2023-08-11 12:50:01 +02:00
parent 1e943ea74e
commit 0627d1e547
5 changed files with 2 additions and 9 deletions

View File

@@ -13,7 +13,6 @@
let back: string | undefined = undefined; let back: string | undefined = undefined;
afterNavigate(() => { afterNavigate(() => {
console.log($page?.route.id);
window.document.body.classList.remove('reader'); window.document.body.classList.remove('reader');
switch ($page?.route.id) { switch ($page?.route.id) {

View File

@@ -11,8 +11,6 @@
return Math.min(Math.max(x, min), max); return Math.min(Math.max(x, min), max);
} }
console.log(page);
$: textBoxes = page.blocks.map((block) => { $: textBoxes = page.blocks.map((block) => {
const { img_height, img_width } = page; const { img_height, img_width } = page;
const { box, font_size, lines, vertical } = block; const { box, font_size, lines, vertical } = block;
@@ -23,7 +21,6 @@
const ymin = clamp(_ymin, 0, img_height); const ymin = clamp(_ymin, 0, img_height);
const xmax = clamp(_xmax, 0, img_width); const xmax = clamp(_xmax, 0, img_width);
const ymax = clamp(_ymax, 0, img_height); const ymax = clamp(_ymax, 0, img_height);
console.log('ymax', img_width);
const width = xmax - xmin; const width = xmax - xmin;
const height = ymax - ymin; const height = ymax - ymin;
@@ -40,7 +37,6 @@
return textBox; return textBox;
}); });
console.log(textBoxes);
export let src; export let src;
</script> </script>

View File

@@ -46,7 +46,7 @@ function getDetails(file: File) {
export async function processFiles(fileList: FileList) { export async function processFiles(fileList: FileList) {
const files = [...fileList] const files = [...fileList]
const zipTypes = ['zip', 'rar', 'cbz'] const zipTypes = ['zip', 'cbz']
const volumes: Record<string, Volume> = {}; const volumes: Record<string, Volume> = {};
for (const file of files) { for (const file of files) {

View File

@@ -9,8 +9,6 @@
if (!volume) { if (!volume) {
goto('/'); goto('/');
} else { } else {
console.log('???');
window.document.body.classList.add('reader'); window.document.body.classList.add('reader');
} }
}); });

View File

@@ -12,7 +12,7 @@
<!-- Note: webkitdirectory is not fully supported and does not work on mobile --> <!-- Note: webkitdirectory is not fully supported and does not work on mobile -->
<FileUpload {onUpload} webkitdirectory>Upload directory</FileUpload> <FileUpload {onUpload} webkitdirectory>Upload directory</FileUpload>
<FileUpload {onUpload} accept=".mokuro,.zip,.cbz,.rar" multiple>Upload files</FileUpload> <FileUpload {onUpload} accept=".mokuro,.zip,.cbz" multiple>Upload files</FileUpload>
{#await promise} {#await promise}
<h2>Loading...</h2> <h2>Loading...</h2>