From 848b38873434000f7dec754db859a19f0ee915cb Mon Sep 17 00:00:00 2001 From: LukeGus Date: Wed, 4 Dec 2024 22:07:51 -0600 Subject: [PATCH] Nano zoom fix #10 --- frontend/src/App.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/App.jsx b/frontend/src/App.jsx index f54fb8ff..cb77b26d 100644 --- a/frontend/src/App.jsx +++ b/frontend/src/App.jsx @@ -53,11 +53,11 @@ const App = () => { const containerHeight = terminalRef.current.offsetHeight; const containerWidth = terminalRef.current.offsetWidth; - // Here, adjust zoom based on container size (for example, make it zoom out if it's smaller) + // Adjust zoom based on container size const newZoomFactor = Math.max(0.5, Math.min(2, containerHeight / 300)); // Adjust this logic as needed if (zoomFactor !== newZoomFactor) { setZoomFactor(newZoomFactor); - terminal.current.setFontSize(14 * newZoomFactor); // Corrected font size update + terminal.current.setOption('fontSize', 14 * newZoomFactor); // Use setOption instead of setFontSize } };