(smooth: boolean)
| 373 | // Open at the first custom detent when provided, otherwise the fully-entered position. |
| 374 | let initial = element.querySelector<HTMLElement>('[data-sheet-initial]'); |
| 375 | let scrollToRest = (smooth: boolean) => { |
| 376 | if (initial) { |
| 377 | scrollDetentIntoView(scroller, initial, axis, after ? 'start' : 'end', smooth); |
| 378 | } else { |
| 379 | scrollAlongAxis(scroller, axis, (enteredScroll / 100) * vp, smooth); |
| 380 | } |
| 381 | }; |
| 382 | if (enteredScroll === 0) { |
| 383 | // The rest position is at scroll 0, so the sheet mounts already entered. Jump to the exit first. |
| 384 | scrollAlongAxis(scroller, axis, (maxScroll / 100) * vp); |
no test coverage detected