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

Function getX

tools/pythonauto/static/codemirror/codemirror.js:1285–1293  ·  view source on GitHub ↗
(ch)

Source from the content-addressed store, hash-verified

1283 var measurement = measureLine(cm, lineObj);
1284
1285 function getX(ch) {
1286 var sp = cursorCoords(cm, Pos(lineNo, ch), "line",
1287 lineObj, measurement);
1288 wrongLine = true;
1289 if (innerOff > sp.bottom) return sp.left - adjust;
1290 else if (innerOff < sp.top) return sp.left + adjust;
1291 else wrongLine = false;
1292 return sp.left;
1293 }
1294
1295 var bidi = getOrder(lineObj), dist = lineObj.text.length;
1296 var from = lineLeft(lineObj), to = lineRight(lineObj);

Callers 1

coordsCharInnerFunction · 0.70

Calls 2

PosFunction · 0.85
cursorCoordsFunction · 0.70

Tested by

no test coverage detected