diff --git a/package.json b/package.json index d92711f..b3e179d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@baekryang/responsive-image-canvas", - "version": "1.0.2", + "version": "1.0.3", "publishConfig": { "registry": "https://git.bnovalab.com/api/packages/baekryang/npm/" }, diff --git a/src/editor/DistortionEditor.tsx b/src/editor/DistortionEditor.tsx index 34bae3c..f92bafb 100644 --- a/src/editor/DistortionEditor.tsx +++ b/src/editor/DistortionEditor.tsx @@ -1,4 +1,4 @@ -import React, { useEffect, useState } from 'react'; +import React, { useEffect } from 'react'; import { DistortionArea } from '../types/area'; import { DistortionEditorProps } from './types'; import { useDistortionEditor } from './hooks/useDistortionEditor'; @@ -15,6 +15,7 @@ export const DistortionEditor: React.FC = ({ width = 800, height = 600, canvasStyle, + showEditor = true, }) => { const { state, @@ -28,9 +29,6 @@ export const DistortionEditor: React.FC = ({ getSelectedArea, } = useDistortionEditor(initialAreas); - // 에디터 모드 토글 상태 - const [showEditor, setShowEditor] = useState(true); - // 영역 변경 시 콜백 호출 useEffect(() => { onAreasChange?.(state.areas); @@ -75,17 +73,6 @@ export const DistortionEditor: React.FC = ({ return (
- {/* 에디터 모드 토글 버튼 */} -
- -
-
{/* 왼쪽: 캔버스 */}
diff --git a/src/editor/types.ts b/src/editor/types.ts index 6ebed2a..916b755 100644 --- a/src/editor/types.ts +++ b/src/editor/types.ts @@ -134,4 +134,6 @@ export interface DistortionEditorProps { height?: number; /** 에디터 캔버스 스타일 커스터마이징 */ canvasStyle?: EditorCanvasStyle; + /** 에디터 표시 여부 (외부에서 제어) */ + showEditor?: boolean; }