MCPcopy Index your code
hub / github.com/witheve/Eve / updateBottomMargin

Function updateBottomMargin

src/codemirror.js:14440–14454  ·  view source on GitHub ↗
(cm)

Source from the content-addressed store, hash-verified

14438 }
14439
14440 function updateBottomMargin(cm) {
14441 var padding = "";
14442 if (cm.lineCount() > 1) {
14443 var totalH = cm.display.scroller.clientHeight - 30,
14444 lastLineH = cm.getLineHandle(cm.lastLine()).height;
14445 padding = (totalH - lastLineH) + "px";
14446 }
14447 if (cm.state.scrollPastEndPadding != padding) {
14448 cm.state.scrollPastEndPadding = padding;
14449 cm.display.lineSpace.parentNode.style.paddingBottom = padding;
14450 cm.off("refresh", updateBottomMargin);
14451 cm.setSize();
14452 cm.on("refresh", updateBottomMargin);
14453 }
14454 }
14455});

Callers 2

codemirror.jsFile · 0.85
onChangeFunction · 0.85

Calls 6

lineCountMethod · 0.80
getLineHandleMethod · 0.80
lastLineMethod · 0.80
offMethod · 0.80
setSizeMethod · 0.80
onMethod · 0.80

Tested by

no test coverage detected