Files
vexplor/frontend/components/screen/templates/NumberingRuleTemplate.ts
kjs 44def0979c fix: 화면 편집기 높이 입력 필드 1px 단위 조절 가능하도록 수정
- 문제: 높이 입력 시 10 단위로만 입력 가능 (예: 1080 입력 불가)
- 원인: 격자 스냅 로직이 onChange마다 높이를 10/20 단위로 강제 반올림
- 해결:
  1. 모든 number input 필드에 step="1" 추가
  2. ScreenDesigner.tsx의 격자 스냅 로직 수정 (높이 스냅 제거)
  3. UnifiedPropertiesPanel.tsx에 로컬 상태 추가하여 입력 중 스냅 방지
  4. onBlur/Enter 시에만 실제 값 업데이트

수정 파일:
- frontend/components/screen/ScreenDesigner.tsx
- frontend/components/screen/panels/UnifiedPropertiesPanel.tsx
- frontend/components/screen/panels/PropertiesPanel.tsx
- frontend/components/screen/panels/ResolutionPanel.tsx
- frontend/components/screen/panels/RowSettingsPanel.tsx
- frontend/components/screen/panels/webtype-configs/NumberTypeConfigPanel.tsx
- frontend/components/screen/panels/webtype-configs/TextTypeConfigPanel.tsx
2025-11-06 10:37:20 +09:00

79 lines
1.8 KiB
TypeScript

/**
* 채번 규칙 템플릿
* 화면관리 시스템에 등록하여 드래그앤드롭으로 사용
*/
import { Hash } from "lucide-react";
export const getDefaultNumberingRuleConfig = () => ({
template_code: "numbering-rule-designer",
template_name: "코드 채번 규칙",
template_name_eng: "Numbering Rule Designer",
description: "코드 자동 채번 규칙을 설정하는 컴포넌트",
category: "admin" as const,
icon_name: "hash",
default_size: {
width: 1200,
height: 800,
},
layout_config: {
components: [
{
type: "numbering-rule" as const,
label: "채번 규칙 설정",
position: { x: 0, y: 0 },
size: { width: 1200, height: 800 },
ruleConfig: {
ruleId: "new-rule",
ruleName: "새 채번 규칙",
parts: [],
separator: "-",
resetPeriod: "none",
currentSequence: 1,
},
maxRules: 6,
style: {
padding: "16px",
backgroundColor: "#ffffff",
},
},
],
},
});
/**
* 템플릿 패널에서 사용할 컴포넌트 정보
*/
export const numberingRuleTemplate = {
id: "numbering-rule",
name: "채번 규칙",
description: "코드 자동 채번 규칙 설정",
category: "admin" as const,
icon: Hash,
defaultSize: { width: 1200, height: 800 },
components: [
{
type: "numbering-rule" as const,
widgetType: undefined,
label: "채번 규칙 설정",
position: { x: 0, y: 0 },
size: { width: 1200, height: 800 },
style: {
padding: "16px",
backgroundColor: "#ffffff",
},
ruleConfig: {
ruleId: "new-rule",
ruleName: "새 채번 규칙",
parts: [],
separator: "-",
resetPeriod: "none",
currentSequence: 1,
},
maxRules: 6,
},
],
};