Skip to content

Commit 08d3e30

Browse files
committed
fix: update
1 parent defccdf commit 08d3e30

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

doc/api_assets/api.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,12 +187,17 @@
187187
});
188188
}
189189

190+
/**
191+
* Scrolls the active link into view, centering it in the viewport.
192+
* This is useful for documentation pages where the active link should be visible
193+
* when the page loads or when navigating to a section.
194+
*/
190195
function scrollIntoViewWithActiveLink() {
191196
const activeLInk = document.querySelector('.interior ul .active');
192197
if (activeLInk) {
193198
activeLInk.scrollIntoView({
194199
behavior: 'smooth',
195-
block: 'center'
200+
block: 'center',
196201
});
197202
}
198203
}

0 commit comments

Comments
 (0)