1
0
Fork 0
mirror of https://github.com/codex-team/codex.docs.git synced 2025-08-10 16:05:32 +02:00

Update table-of-content.js

This commit is contained in:
Taly 2022-07-20 11:25:40 +03:00
parent d0a977152c
commit 4ff756e1d0

View file

@ -119,7 +119,7 @@ export default class TableOfContent {
/** /**
* Define a flag to reduce number of calls to detectSection function * Define a flag to reduce number of calls to detectSection function
*/ */
const delayedDetectSectionFunction = Decorators.throttle((lastKnownScrollPosition) => { const throttledDetectSectionFunction = Decorators.throttle((lastKnownScrollPosition) => {
detectSection(lastKnownScrollPosition); detectSection(lastKnownScrollPosition);
}, 200); }, 200);
@ -135,7 +135,7 @@ export default class TableOfContent {
/** /**
* Call section detecting function * Call section detecting function
*/ */
delayedDetectSectionFunction(lastKnownScrollPosition); throttledDetectSectionFunction(lastKnownScrollPosition);
}); });
} }