마우스 오버 후 1초가 지나면 이미지 미리보기 팝업창 실행

This commit is contained in:
2026-05-14 11:43:54 +09:00
parent 8c90aa5be8
commit c09227facc
3 changed files with 103 additions and 4 deletions
+7 -4
View File
@@ -1,7 +1,8 @@
import { state } from './state.js';
import * as pinchZoom from './handlers/pinch-zoom.js';
import * as selection from './handlers/selection.js';
import * as dragDrop from './handlers/drag-drop.js';
import { state } from './state.js';
import * as pinchZoom from './handlers/pinch-zoom.js';
import * as selection from './handlers/selection.js';
import * as dragDrop from './handlers/drag-drop.js';
import * as hoverPreview from './handlers/hover-preview.js';
// ── DOM ──────────────────────────────────────────────
const grid = document.getElementById('grid');
@@ -38,6 +39,7 @@ const callbacks = {
pinchZoom.init({ gridContainer, thumbSizeHint });
selection.init({ gridContainer, rubberBand, grid, state, callbacks });
dragDrop.init({ grid, gridContainer, dragGhostEl, state, callbacks });
hoverPreview.init();
// ── 버튼 이벤트 ──────────────────────────────────
inputPrefix.addEventListener('input', updatePreview);
@@ -146,6 +148,7 @@ function createCard(file, idx, dataUrl) {
card.appendChild(body);
dragDrop.setupCard(card);
hoverPreview.setupCard(card);
card.addEventListener('click', selection.onCardClick);
return card;