From c3f11ac06b833d08f3906dc4b72a5bf06eed02a2 Mon Sep 17 00:00:00 2001 From: Kiet Ho Date: Thu, 22 Aug 2024 22:16:51 -0400 Subject: [PATCH] Fix offset issue --- app/bun.lockb | Bin 313905 -> 313905 bytes app/electron/main/index.ts | 2 -- app/package.json | 2 +- app/src/routes/project/WebviewArea/Frame.tsx | 2 +- 4 files changed, 2 insertions(+), 4 deletions(-) diff --git a/app/bun.lockb b/app/bun.lockb index 4444eefb0e73ae223c2667ff4041f78fc6f8a25f..6f4479ec2a149a8c96118a526b59e6614b32322b 100755 GIT binary patch delta 173 zcmV;e08;<4loPR(6Ob+-DKiE*5FzZ2VhTdsA$1soga`L}{b7vpM{sp$X6}O=u}*^6 z0U(pnGB<+=*|!MU0p%`0*kcWS%tUMHrpEi zxBdBqyUFp&*PYK6%$D3yaezZ5ar+NpA*tq5Y#i;n98BAFIhc**m<{!ewZ1pubiNDBY} diff --git a/app/electron/main/index.ts b/app/electron/main/index.ts index 6ed2564f1..afab09561 100644 --- a/app/electron/main/index.ts +++ b/app/electron/main/index.ts @@ -55,8 +55,6 @@ function createWindow() { title: APP_NAME, icon: path.join(process.env.VITE_PUBLIC, 'favicon.ico'), titleBarStyle: 'hiddenInset', - show: true, - fullscreenable: true, webPreferences: { preload, webviewTag: true, diff --git a/app/package.json b/app/package.json index 97f61a6cf..4c2191f37 100644 --- a/app/package.json +++ b/app/package.json @@ -86,7 +86,7 @@ "@vitejs/plugin-react": "^4.2.1", "autoprefixer": "^10.4.19", "css-tree": "^2.3.1", - "electron": "^31.3.1", + "electron": "^32.0.1", "electron-builder": "^24.13.3", "eslint": "8.x", "eslint-config-prettier": "^9.1.0", diff --git a/app/src/routes/project/WebviewArea/Frame.tsx b/app/src/routes/project/WebviewArea/Frame.tsx index ce5cff9a7..d58139d92 100644 --- a/app/src/routes/project/WebviewArea/Frame.tsx +++ b/app/src/routes/project/WebviewArea/Frame.tsx @@ -39,7 +39,6 @@ const Webview = observer( if (!webview) { return; } - editorEngine.webviews.register(webview); messageBridge.register(webview, metadata); setBrowserEventListeners(webview); @@ -67,6 +66,7 @@ const Webview = observer( if (!webview) { return; } + webview.setZoomLevel(0); const body = await editorEngine.dom.getBodyFromWebview(webview); editorEngine.dom.setDom(metadata.id, body); setDomFailed(body.children.length === 0);