편집 요약 없음 |
편집 요약 없음 |
||
89번째 줄: | 89번째 줄: | ||
let isDragging = false, offsetX = 0, offsetY = 0; | let isDragging = false, offsetX = 0, offsetY = 0; | ||
header.addEventListener('mousedown', startDrag); | header.addEventListener('mousedown', startDrag); | ||
header.addEventListener('touchstart', startDrag, { passive: false }); | header.addEventListener('touchstart', startDrag, { passive: false }); | ||
112번째 줄: | 111번째 줄: | ||
const newY = event.clientY - offsetY; | const newY = event.clientY - offsetY; | ||
const maxX = window.innerWidth - popup.offsetWidth; | const maxX = window.innerWidth - popup.offsetWidth; | ||
const maxY = window.innerHeight - popup.offsetHeight; | const maxY = window.innerHeight - popup.offsetHeight; | ||
120번째 줄: | 118번째 줄: | ||
popup.style.transform = 'none'; | popup.style.transform = 'none'; | ||
e.preventDefault(); | e.preventDefault(); | ||
} | } | ||