MCPcopy Create free account
hub / github.com/HelloZeroNet/ZeroNet / calculateScrollerHeight

Function calculateScrollerHeight

plugins/Sidebar/media/all.js:412–420  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

410 scrollerHeight;
411
412 function calculateScrollerHeight() {
413 // *Calculation of how tall scroller should be
414 var visibleRatio = scrollContainer.offsetHeight / scrollContentWrapper.scrollHeight;
415 if (visibleRatio == 1)
416 scroller.style.display = "none";
417 else
418 scroller.style.display = "block";
419 return visibleRatio * scrollContainer.offsetHeight;
420 }
421
422 function moveScroller(evt) {
423 // Move Scroll bar to top offset

Callers 2

updateHeightFunction · 0.70
createScrollerFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected