MCPcopy Create free account
hub / github.com/TruthHun/BookStack / maybeClipScrollbars

Function maybeClipScrollbars

static/editor.md/lib/codemirror/lib/codemirror.js:641–650  ·  view source on GitHub ↗
(cm)

Source from the content-addressed store, hash-verified

639 };
640
641 function maybeClipScrollbars(cm) {
642 var display = cm.display;
643 if (!display.scrollbarsClipped && display.scroller.offsetWidth) {
644 display.nativeBarWidth = display.scroller.offsetWidth - display.scroller.clientWidth;
645 display.heightForcer.style.height = scrollGap(cm) + "px";
646 display.sizer.style.marginBottom = -display.nativeBarWidth + "px";
647 display.sizer.style.borderRightWidth = scrollGap(cm) + "px";
648 display.scrollbarsClipped = true;
649 }
650 }
651
652 // Does the actual updating of the line display. Bails out
653 // (returning false) when there is nothing to be done and forced is

Callers 1

endOperation_R1Function · 0.70

Calls 1

scrollGapFunction · 0.70

Tested by

no test coverage detected