(modal)
| 666 | const top = Math.max(0, Math.min(vh - dh, initT + e.clientY - startY)); |
| 667 | dia.style.left = left + 'px'; |
| 668 | dia.style.top = top + 'px'; |
| 669 | }; |
| 670 | const onUp = () => { |
| 671 | dragging = false; |
| 672 | document.body.style.userSelect = ''; |
| 673 | }; |
| 674 | |
| 675 | const onTouchStart = (e) => { |
| 676 | if (closeBtn.contains(e.target)) return; |
| 677 | if (!dragHandle.contains(e.target)) return; |
| 678 | const t = e.touches[0]; |
| 679 | dragging = true; |
| 680 | startX = t.clientX; |
| 681 | startY = t.clientY; |
| 682 | const r = dia.getBoundingClientRect(); |
| 683 | initL = r.left; |
| 684 | initT = r.top; |
| 685 | dia.style.position = 'fixed'; |
| 686 | dia.style.left = initL + 'px'; |
| 687 | dia.style.top = initT + 'px'; |
| 688 | }; |
| 689 | const onTouchMove = (e) => { |
| 690 | if (!dragging) return; |
| 691 | e.preventDefault(); |
nothing calls this directly
no outgoing calls
no test coverage detected