(event: TouchEvent)
| 679 | return current.full - y > threshold ? current.card : current.full; |
| 680 | }; |
| 681 | const onTouchStart = (event: TouchEvent) => { |
| 682 | dragging = true; |
| 683 | refreshMoving(); |
| 684 | landGlide(); |
| 685 | if (opening && !closing) { |
| 686 | land(); |
| 687 | update(); |
| 688 | } |
| 689 | touchX = event.touches[0]?.clientX ?? 0; |
| 690 | touchY = event.touches[0]?.clientY ?? 0; |
| 691 | if (hasOpenLayer()) { |
| 692 | take = null; |
| 693 | } else if (layout === 'card') { |
| 694 | take = 'lift'; |
| 695 | } else if (window.scrollY <= 2) { |
| 696 | take = 'pull'; |
| 697 | } else { |
| 698 | take = null; |
| 699 | } |
| 700 | }; |
| 701 | const onTouchMove = (event: TouchEvent) => { |
| 702 | const touch = event.touches[0]; |
| 703 | if (!touch) { |
nothing calls this directly
no test coverage detected