(settleOn?: number)
| 378 | }; |
| 379 | |
| 380 | const endDrag = (settleOn?: number) => { |
| 381 | if (lens.current && settleOn !== undefined) { |
| 382 | settleLens(settleOn); |
| 383 | } else { |
| 384 | stopLens(); |
| 385 | } |
| 386 | pointer.current = null; |
| 387 | setDrag(null); |
| 388 | setPressed(false); |
| 389 | setPull(0); |
| 390 | }; |
| 391 | |
| 392 | // A finger that lifts away from the bar (capture refused, or the release |
| 393 | // lands outside) still ends the press, so the bar never stays lifted. |
no test coverage detected