()
| 743 | onScroll(); |
| 744 | }; |
| 745 | const onTouchEnd = () => { |
| 746 | dragging = false; |
| 747 | take = null; |
| 748 | if (!held) { |
| 749 | return; |
| 750 | } |
| 751 | const { from, samples } = held; |
| 752 | const y = virtualY ?? from; |
| 753 | held = null; |
| 754 | let velocity = 0; |
| 755 | if (samples.length >= 2) { |
| 756 | const [firstY, firstAt] = samples[0]; |
| 757 | const [lastTouchY, lastAt] = samples[samples.length - 1]; |
| 758 | velocity = (lastTouchY - firstY) / Math.max(1, lastAt - firstAt); |
| 759 | } |
| 760 | glideTo(snapTarget(from, y, velocity)); |
| 761 | }; |
| 762 | |
| 763 | // Close plays the opening backwards: the page rises from wherever the |
| 764 | // drawer stands to where it stood before Read, by the same transform, |
nothing calls this directly
no test coverage detected