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

Function updateHeightsInViewport

tools/pythonauto/static/codemirror/codemirror.js:554–575  ·  view source on GitHub ↗
(cm)

Source from the content-addressed store, hash-verified

552 }
553
554 function updateHeightsInViewport(cm) {
555 var display = cm.display;
556 var prevBottom = display.lineDiv.offsetTop;
557 for (var node = display.lineDiv.firstChild, height; node; node = node.nextSibling) if (node.lineObj) {
558 if (ie_lt8) {
559 var bot = node.offsetTop + node.offsetHeight;
560 height = bot - prevBottom;
561 prevBottom = bot;
562 } else {
563 var box = getRect(node);
564 height = box.bottom - box.top;
565 }
566 var diff = node.lineObj.height - height;
567 if (height < 2) height = textHeight(display);
568 if (diff > .001 || diff < -.001) {
569 updateLineHeight(node.lineObj, height);
570 var widgets = node.lineObj.widgets;
571 if (widgets) for (var i = 0; i < widgets.length; ++i)
572 widgets[i].height = widgets[i].node.offsetHeight;
573 }
574 }
575 }
576
577 function updateViewOffset(cm) {
578 var off = cm.display.viewOffset = heightAtLine(cm, getLine(cm.doc, cm.display.showingFrom));

Callers 1

updateDisplayInnerFunction · 0.70

Calls 3

getRectFunction · 0.85
textHeightFunction · 0.70
updateLineHeightFunction · 0.70

Tested by

no test coverage detected