Skip to content

Commit

Permalink
Small cleanups & some more comments in report.js (mne-tools#10008)
Browse files Browse the repository at this point in the history
  • Loading branch information
hoechenberger authored Nov 16, 2021
1 parent 9a305c1 commit 8e2ca2a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions mne/report/js_and_css/report.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ const refreshScrollSpy = () =>{
bootstrap.ScrollSpy.getInstance(dataSpyEl)
.refresh()
})
console.log('scrollspy refreshed!'); // TODO remove debugging output
}

/* Show or hide elements based on their tag */
Expand Down Expand Up @@ -59,7 +58,6 @@ const toggleTagVisibility = (tagName) => {
refreshScrollSpy();
}


/* Gather all available tags and expose them in the global namespace */
let tags = []; // array of objects

Expand Down Expand Up @@ -149,6 +147,8 @@ const addFilterByTagsCheckboxEventHandlers = () => {
});
}

/* Avoid top of content getting hidden behind navbar after clicking on a TOC
link */
const _handleTocLinkClick = (e) => {
e.preventDefault();

Expand Down Expand Up @@ -186,6 +186,7 @@ const addSliderEventHandlers = () => {
})
}

/* Avoid top of content gets hidden behind the top navbar */
const fixTopMargin = () => {
const topBarHeight = document.querySelector('#top-bar').scrollHeight
const margin = 30 + topBarHeight;
Expand Down

0 comments on commit 8e2ca2a

Please sign in to comment.