Merge branch 'develop' into feat-1714
This commit is contained in:
commit
881b7dd6ae
69 changed files with 1096 additions and 461 deletions
|
|
@ -24,6 +24,14 @@ export function getStickyTop(el: HTMLElement, container: HTMLElement | null = nu
|
|||
return getStickyTop(el.parentElement, container, newTop);
|
||||
}
|
||||
|
||||
export function getStickyBottom(el: HTMLElement, container: HTMLElement | null = null, bottom = 0) {
|
||||
if (!el.parentElement) return bottom;
|
||||
const data = el.dataset.stickyContainerFooterHeight;
|
||||
const newBottom = data ? Number(data) + bottom : bottom;
|
||||
if (el === container) return newBottom;
|
||||
return getStickyBottom(el.parentElement, container, newBottom);
|
||||
}
|
||||
|
||||
export function getScrollPosition(el: HTMLElement | null): number {
|
||||
const container = getScrollContainer(el);
|
||||
return container == null ? window.scrollY : container.scrollTop;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue