diff options
| author | syuilo <Syuilotan@yahoo.co.jp> | 2021-02-14 22:26:07 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-02-14 22:26:07 +0900 |
| commit | 1eda7c85652c6e4295626ab94bc4084aaa141872 (patch) | |
| tree | ed69b506905d0a98db6b148563dffffb29dfa28a /src/client/scripts/scroll.ts | |
| parent | ServiceWorker: onfetchで何もしないように (#7195) (diff) | |
| download | sharkey-1eda7c85652c6e4295626ab94bc4084aaa141872.tar.gz sharkey-1eda7c85652c6e4295626ab94bc4084aaa141872.tar.bz2 sharkey-1eda7c85652c6e4295626ab94bc4084aaa141872.zip | |
Chat UI (#7197)
* wip
* wip
* wip
* wip
* refactor
* Update note.vue
* wip
Diffstat (limited to 'src/client/scripts/scroll.ts')
| -rw-r--r-- | src/client/scripts/scroll.ts | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/client/scripts/scroll.ts b/src/client/scripts/scroll.ts index 18c3366891..bc6d1530c5 100644 --- a/src/client/scripts/scroll.ts +++ b/src/client/scripts/scroll.ts @@ -54,6 +54,14 @@ export function scroll(el: Element, top: number) { } } +export function scrollToTop(el: Element) { + scroll(el, 0); +} + +export function scrollToBottom(el: Element) { + scroll(el, 99999); // TODO: ちゃんと計算する +} + export function isBottom(el: Element, asobi = 0) { const container = getScrollContainer(el); const current = container |