Compare commits

..

1 Commits

+5 -3
View File
@@ -434,9 +434,11 @@ export function Canvas({ frame, onChange, onSelectIds, enableGuides = true }: Ca
tabIndex={0}
onKeyDown={onKeyDown}
onMouseDown={(e) => {
// 빈 캔버스 클릭 시 마퀴 시작 또는 선택 해제
// 객체 onMouseDown에서 선택을 처리하므로, 여기서는 드래그 박스 시작만 담당
if ((e.target as HTMLElement).dataset.testid === 'wysiwyg-canvas') {
// 빈 영역(객체/핸들이 아닌 영역) 클릭 시 마퀴 시작 또는 선택 해제
const t = e.target as HTMLElement
const isObj = !!t.closest('[data-testid^="obj-"],[aria-label^="object "]')
const isHandle = !!t.closest('[data-testid^="resize-handle-"]')
if (!isObj && !isHandle) {
setSelectedIds([])
setMarquee({ active: true, x0: e.clientX, y0: e.clientY, x1: e.clientX, y1: e.clientY })
try { onSelectIds?.([]) } catch {}