모달 잘리는거 해결
This commit is contained in:
parent
bc10f2101a
commit
fa6c00b6be
|
|
@ -678,12 +678,13 @@ export const EditModal: React.FC<EditModalProps> = ({ className }) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
// 화면관리에서 설정한 크기 = 컨텐츠 영역 크기
|
// 화면관리에서 설정한 크기 = 컨텐츠 영역 크기
|
||||||
// 실제 모달 크기 = 컨텐츠 + 헤더 + gap + padding
|
// 실제 모달 크기 = 컨텐츠 + 헤더 + gap + padding + 라벨 공간
|
||||||
const headerHeight = 52; // DialogHeader (타이틀 + border-b + py-3)
|
const headerHeight = 52; // DialogHeader (타이틀 + border-b + py-3)
|
||||||
const dialogGap = 16; // DialogContent gap-4
|
const dialogGap = 16; // DialogContent gap-4
|
||||||
const extraPadding = 24; // 추가 여백 (안전 마진)
|
const extraPadding = 24; // 추가 여백 (안전 마진)
|
||||||
|
const labelSpace = 30; // 입력 필드 위 라벨 공간 (-top-6 = 24px + 여유)
|
||||||
|
|
||||||
const totalHeight = screenDimensions.height + headerHeight + dialogGap + extraPadding;
|
const totalHeight = screenDimensions.height + headerHeight + dialogGap + extraPadding + labelSpace;
|
||||||
|
|
||||||
return {
|
return {
|
||||||
className: "overflow-hidden p-0",
|
className: "overflow-hidden p-0",
|
||||||
|
|
@ -729,7 +730,7 @@ export const EditModal: React.FC<EditModalProps> = ({ className }) => {
|
||||||
className="relative bg-white"
|
className="relative bg-white"
|
||||||
style={{
|
style={{
|
||||||
width: screenDimensions?.width || 800,
|
width: screenDimensions?.width || 800,
|
||||||
height: screenDimensions?.height || 600,
|
height: (screenDimensions?.height || 600) + 30, // 라벨 공간 추가
|
||||||
transformOrigin: "center center",
|
transformOrigin: "center center",
|
||||||
maxWidth: "100%",
|
maxWidth: "100%",
|
||||||
maxHeight: "100%",
|
maxHeight: "100%",
|
||||||
|
|
@ -739,13 +740,14 @@ export const EditModal: React.FC<EditModalProps> = ({ className }) => {
|
||||||
// 컴포넌트 위치를 offset만큼 조정
|
// 컴포넌트 위치를 offset만큼 조정
|
||||||
const offsetX = screenDimensions?.offsetX || 0;
|
const offsetX = screenDimensions?.offsetX || 0;
|
||||||
const offsetY = screenDimensions?.offsetY || 0;
|
const offsetY = screenDimensions?.offsetY || 0;
|
||||||
|
const labelSpace = 30; // 라벨 공간 (입력 필드 위 -top-6 라벨용)
|
||||||
|
|
||||||
const adjustedComponent = {
|
const adjustedComponent = {
|
||||||
...component,
|
...component,
|
||||||
position: {
|
position: {
|
||||||
...component.position,
|
...component.position,
|
||||||
x: parseFloat(component.position?.x?.toString() || "0") - offsetX,
|
x: parseFloat(component.position?.x?.toString() || "0") - offsetX,
|
||||||
y: parseFloat(component.position?.y?.toString() || "0") - offsetY,
|
y: parseFloat(component.position?.y?.toString() || "0") - offsetY + labelSpace, // 라벨 공간 추가
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue