Compare commits

...
Author SHA1 Message Date
Tanish Manku f4c1014858 Make sure to run autocentering when the base image changes 2026-01-30 23:44:09 -08:00
@@ -568,6 +568,10 @@ const PageDraw = () => {
// Auto-fit canvas to screen on initial load
useEffect(() => {
if (!store.baseImageBitmap) {
return;
}
const autoFitCanvas = async () => {
let attempts = 0;
const maxAttempts = 20;
@@ -593,7 +597,7 @@ const PageDraw = () => {
autoFitCanvas();
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);
}, [store.baseImageBitmap]);
// Display image selector on launch, otherwise hide it
// Also show loading state if info is set but image is loading