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

Function heightAtLine

tools/pythonauto/static/codemirror/codemirror.js:5273–5290  ·  view source on GitHub ↗
(cm, lineObj)

Source from the content-addressed store, hash-verified

5271 }
5272
5273 function heightAtLine(cm, lineObj) {
5274 lineObj = visualLine(cm.doc, lineObj);
5275
5276 var h = 0, chunk = lineObj.parent;
5277 for (var i = 0; i < chunk.lines.length; ++i) {
5278 var line = chunk.lines[i];
5279 if (line == lineObj) break;
5280 else h += line.height;
5281 }
5282 for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {
5283 for (var i = 0; i < p.children.length; ++i) {
5284 var cur = p.children[i];
5285 if (cur == chunk) break;
5286 else h += cur.height;
5287 }
5288 }
5289 return h;
5290 }
5291
5292 function getOrder(line) {
5293 var order = line.order;

Callers 5

updateViewOffsetFunction · 0.70
intoCoordSystemFunction · 0.70
coordsCharInnerFunction · 0.70
codemirror.jsFile · 0.70
addLineWidgetFunction · 0.70

Calls 1

visualLineFunction · 0.70

Tested by

no test coverage detected