File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
src/Elastic.Markdown/Assets Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -66,13 +66,18 @@ function findCurrentTocLink(elements: TocElements): HTMLAnchorElement | undefine
6666function getVisibleHeadings ( elements : TocElements ) {
6767 return elements . headings . filter ( heading => {
6868 const rect = heading . getBoundingClientRect ( ) ;
69- return rect . top - HEADING_OFFSET >= 0 && rect . bottom <= window . innerHeight ;
69+ return rect . top - HEADING_OFFSET + 64 >= 0 && rect . top <= window . innerHeight ;
7070 } ) ;
7171}
7272
7373// Handle bottom of page scroll behavior
7474function handleBottomScroll ( elements : TocElements ) {
7575 const visibleHeadings = getVisibleHeadings ( elements ) ;
76+
77+ visibleHeadings . forEach ( heading => {
78+ console . log ( heading . textContent . trim ( ) ) ;
79+ } )
80+
7681 if ( visibleHeadings . length === 0 ) return ;
7782
7883 const firstHeading = visibleHeadings [ 0 ] ;
You can’t perform that action at this time.
0 commit comments