구분선 리사이즈 개선

This commit is contained in:
dohyeons
2025-12-19 18:19:29 +09:00
parent 8d34b73a45
commit 8789b2b864
3 changed files with 62 additions and 28 deletions

View File

@@ -562,11 +562,17 @@ export function ReportDesignerRightPanel() {
<Label className="text-xs"></Label>
<Select
value={selectedComponent.orientation || "horizontal"}
onValueChange={(value) =>
onValueChange={(value) => {
// 방향 변경 시 너비/높이 스왑
const isToVertical = value === "vertical";
const currentWidth = selectedComponent.width;
const currentHeight = selectedComponent.height;
updateComponent(selectedComponent.id, {
orientation: value as "horizontal" | "vertical",
})
}
width: isToVertical ? 10 : currentWidth > 50 ? currentWidth : 300,
height: isToVertical ? currentWidth > 50 ? currentWidth : 300 : 10,
});
}}
>
<SelectTrigger className="h-8">
<SelectValue />