Merge branch 'develop' into feat-1714

This commit is contained in:
かっこかり 2024-07-12 16:38:38 +09:00 committed by GitHub
commit 881b7dd6ae
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
69 changed files with 1096 additions and 461 deletions

View file

@ -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;