We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
rootMarginBottom
1 parent 91c228a commit 99a825cCopy full SHA for 99a825c
src/components/sidebarTableOfContents/index.tsx
@@ -115,7 +115,8 @@ export function SidebarTableOfContents() {
115
// account for the header height
116
const rootMarginTop = 100;
117
// element is consiered in view if it is in the top 1/3 of the screen
118
- const rootMarginBottom = (2 / 3) * window.innerHeight - rootMarginTop;
+ const rootMarginBottomRaw = (2 / 3) * window.innerHeight - rootMarginTop;
119
+ const rootMarginBottom = Math.floor(rootMarginBottomRaw);
120
const observerOptions = {
121
rootMargin: `${rootMarginTop}px 0px -${rootMarginBottom}px 0px`,
122
threshold: 1,
0 commit comments