MCPcopy
hub / github.com/csev/py4e / checkHeights

Function checkHeights

tools/pythonauto/static/codemirrorepl/codemirrorepl.js:1181–1197  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1179 " nodes=" + lineDiv.childNodes.length);
1180
1181 function checkHeights() {
1182 maxWidth = scroller.clientWidth;
1183 var curNode = lineDiv.firstChild, heightChanged = false;
1184 doc.iter(showingFrom, showingTo, function(line) {
1185 if (!line.hidden) {
1186 var height = Math.round(curNode.offsetHeight / th) || 1;
1187 if (line.height != height) {
1188 updateLineHeight(line, height);
1189 gutterDirty = heightChanged = true;
1190 }
1191 }
1192 curNode = curNode.nextSibling;
1193 });
1194 if (heightChanged)
1195 code.style.height = (doc.height * th + 2 * paddingTop()) + "px";
1196 return heightChanged;
1197 }
1198
1199 if (options.lineWrapping) {
1200 checkHeights();

Callers 1

updateDisplayFunction · 0.85

Calls 2

updateLineHeightFunction · 0.70
paddingTopFunction · 0.70

Tested by

no test coverage detected