diff --git a/example.png b/example.png new file mode 100644 index 0000000..cd72d70 Binary files /dev/null and b/example.png differ diff --git a/web/js/pixel_forge.js b/web/js/pixel_forge.js index e8a2f2c..83ea0ce 100644 --- a/web/js/pixel_forge.js +++ b/web/js/pixel_forge.js @@ -52,10 +52,17 @@ app.registerExtension({ console.log("PixelForge: updateResolutions called with:", { aspect, orientation, div, maxMp }); - // Auto-select "square" orientation for 1:1 aspect ratio - if (aspect === "1:1" && orientationWidget && orientation !== "square") { - orientationWidget.value = "square"; - console.log("PixelForge: Auto-selected square orientation for 1:1 ratio"); + // Auto-adjust orientation based on aspect ratio + if (orientationWidget) { + if (aspect === "1:1" && orientation !== "square") { + // For 1:1, force square orientation + orientationWidget.value = "square"; + console.log("PixelForge: Auto-selected square orientation for 1:1 ratio"); + } else if (aspect !== "1:1" && orientation === "square") { + // For non-1:1 ratios, if currently square, switch to landscape + orientationWidget.value = "landscape"; + console.log("PixelForge: Auto-switched from square to landscape for non-1:1 ratio"); + } } const ratio = ASPECT_RATIOS[aspect];