MCPcopy Index your code
hub / github.com/csev/py4e / visibleLines

Function visibleLines

tools/pythonauto/static/codemirror/codemirror.js:375–382  ·  view source on GitHub ↗
(display, doc, viewPort)

Source from the content-addressed store, hash-verified

373 }
374
375 function visibleLines(display, doc, viewPort) {
376 var top = display.scroller.scrollTop, height = display.wrapper.clientHeight;
377 if (typeof viewPort == "number") top = viewPort;
378 else if (viewPort) {top = viewPort.top; height = viewPort.bottom - viewPort.top;}
379 top = Math.floor(top - paddingTop(display));
380 var bottom = Math.ceil(top + height);
381 return {from: lineAtHeight(doc, top), to: lineAtHeight(doc, bottom)};
382 }
383
384 // LINE NUMBERS
385

Callers 2

updateDisplayFunction · 0.70
extendFunction · 0.70

Calls 2

paddingTopFunction · 0.70
lineAtHeightFunction · 0.70

Tested by

no test coverage detected