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