Update web_src/js/features/file-view.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: hamkido <hamki.do2000@gmail.com>
This commit is contained in:
hamkidoandCopilot authored and GitHub committed 2026-01-26 17:17:15 +08:00
1 parent 82a91140bf
commit 6a5ea3b2f3
1 file changed
+2 -2
+2 -2
View File
@@ -170,8 +170,8 @@ function initSidebarToggle(elFileView: HTMLElement): void {
const fileHeader = elFileView.querySelector('.file-header');
const segment = elFileView.querySelector('.ui.bottom.segment');
if (fileHeader && segment) {
// Use many thresholds to get fine-grained position updates during scroll
const thresholds = Array.from({length: 101}, (_, i) => i / 100);
// Use a small set of thresholds to get periodic position updates during scroll
const thresholds = [0, 0.25, 0.5, 0.75, 1];
const positionObserver = new IntersectionObserver(() => {
updatePosition();
}, {threshold: thresholds});