파일 삭제 기능 추가, undo / redo 기능에 적용
This commit is contained in:
@@ -59,6 +59,12 @@ export function createCard(file, idx) {
|
||||
checkBadge.className = 'card-check';
|
||||
checkBadge.textContent = '✓';
|
||||
|
||||
const deleteBtn = document.createElement('button');
|
||||
deleteBtn.className = 'card-delete';
|
||||
deleteBtn.title = '삭제';
|
||||
deleteBtn.textContent = '×';
|
||||
deleteBtn.draggable = false;
|
||||
|
||||
// src 없이 생성 — IntersectionObserver가 뷰포트 진입 시 로딩
|
||||
const thumb = document.createElement('img');
|
||||
thumb.className = 'card-thumb';
|
||||
@@ -78,6 +84,7 @@ export function createCard(file, idx) {
|
||||
body.appendChild(newNameEl);
|
||||
card.appendChild(numBadge);
|
||||
card.appendChild(checkBadge);
|
||||
card.appendChild(deleteBtn);
|
||||
card.appendChild(thumb);
|
||||
card.appendChild(body);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user