mirror of
https://github.com/cinnyapp/cinny.git
synced 2025-09-14 06:42:25 +03:00
Add pagination in room timeline
Signed-off-by: Ajay Bura <ajbura@gmail.com>
This commit is contained in:
parent
beb32755a3
commit
57697142a2
12 changed files with 305 additions and 235 deletions
|
@ -84,3 +84,13 @@ export function getUrlPrams(paramName) {
|
|||
const urlParams = new URLSearchParams(queryString);
|
||||
return urlParams.get(paramName);
|
||||
}
|
||||
|
||||
export function getScrollInfo(target) {
|
||||
const scroll = {};
|
||||
scroll.top = Math.round(target.scrollTop);
|
||||
scroll.height = Math.round(target.scrollHeight);
|
||||
scroll.viewHeight = Math.round(target.offsetHeight);
|
||||
scroll.bottom = Math.round(scroll.top + scroll.viewHeight);
|
||||
scroll.isScrollable = scroll.height > scroll.viewHeight;
|
||||
return scroll;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue