Skip to content

Commit 562ebd7

Browse files
committed
doc: update
1 parent c4169cb commit 562ebd7

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

doc/api_assets/api.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,16 @@
187187
});
188188
}
189189

190+
function scrollIntoViewWithActiveLink() {
191+
const activeLInk = document.querySelector('.interior ul .active');
192+
if (activeLInk) {
193+
activeLInk.scrollIntoView({
194+
behavior: 'smooth',
195+
block: 'center'
196+
});
197+
}
198+
}
199+
190200
function bootstrap() {
191201
// Check if we have JavaScript support.
192202
document.documentElement.classList.add('has-js');
@@ -206,6 +216,8 @@
206216
setupFlavorToggles();
207217

208218
setupCopyButton();
219+
220+
scrollIntoViewWithActiveLink();
209221
}
210222

211223
if (document.readyState === 'loading') {

0 commit comments

Comments
 (0)