'use client'; import React, { useRef, ReactNode } from 'react'; import { UseDragReturn } from '../types'; interface DocumentContentProps { children: ReactNode; zoom: number; drag: UseDragReturn; enableDrag?: boolean; } /** * 문서 콘텐츠 영역 * - 줌 적용 * - 드래그 이동 (줌 100% 초과 시) */ export function DocumentContent({ children, zoom, drag, enableDrag = true, }: DocumentContentProps) { const containerRef = useRef(null); const contentRef = useRef(null); // 드래그는 줌 100% 초과 시에만 활성화 const isDragEnabled = enableDrag && zoom > 100; return (
{children}
{/* 모바일 줌 힌트 */} {zoom === 100 && enableDrag && (
확대 후 드래그로 이동
)}
); }