From 795fcff90f9e39e8eebaf6519a2566b544cdee67 Mon Sep 17 00:00:00 2001 From: Your Name Date: Fri, 6 Mar 2026 08:59:14 +0800 Subject: [PATCH] feat(resize): expand aspect ratio presets in image adjust dialog --- components/image-annotator.tsx | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/components/image-annotator.tsx b/components/image-annotator.tsx index 615c8d1e6..9a93f2b73 100644 --- a/components/image-annotator.tsx +++ b/components/image-annotator.tsx @@ -266,14 +266,16 @@ export function ImageAnnotator({ // 比例选项定义 const aspectRatios = [ { label: "智能", value: "smart", ratio: null }, // 智能:根据原图比例 - { label: "21:9", value: "21:9", ratio: 21 / 9 }, - { label: "16:9", value: "16:9", ratio: 16 / 9 }, - { label: "3:2", value: "3:2", ratio: 3 / 2 }, - { label: "4:3", value: "4:3", ratio: 4 / 3 }, { label: "1:1", value: "1:1", ratio: 1 / 1 }, - { label: "3:4", value: "3:4", ratio: 3 / 4 }, - { label: "2:3", value: "2:3", ratio: 2 / 3 }, + { label: "16:9", value: "16:9", ratio: 16 / 9 }, { label: "9:16", value: "9:16", ratio: 9 / 16 }, + { label: "4:3", value: "4:3", ratio: 4 / 3 }, + { label: "3:4", value: "3:4", ratio: 3 / 4 }, + { label: "3:2", value: "3:2", ratio: 3 / 2 }, + { label: "2:3", value: "2:3", ratio: 2 / 3 }, + { label: "5:4", value: "5:4", ratio: 5 / 4 }, + { label: "4:5", value: "4:5", ratio: 4 / 5 }, + { label: "21:9", value: "21:9", ratio: 21 / 9 }, ]; // 根据比例和宽度计算高度 @@ -1684,7 +1686,7 @@ export function ImageAnnotator({ {isResizeMode && ( <>
- {aspectRatios.slice(0, 4).map((ratio) => ( + {aspectRatios.map((ratio) => (