MCPcopy Create free account
hub / github.com/sql-js/sql.js / updateExternalMeasurement

Function updateExternalMeasurement

GUI/codemirror/lib/codemirror.js:1503–1512  ·  view source on GitHub ↗
(cm, line)

Source from the content-addressed store, hash-verified

1501 // Render a line into the hidden node display.externalMeasured. Used
1502 // when measurement is needed for a line that's not in the viewport.
1503 function updateExternalMeasurement(cm, line) {
1504 line = visualLine(line);
1505 var lineN = lineNo(line);
1506 var view = cm.display.externalMeasured = new LineView(cm.doc, line, lineN);
1507 view.lineN = lineN;
1508 var built = view.built = buildLineContent(cm, view);
1509 view.text = built.pre;
1510 removeChildrenAndAdd(cm.display.lineMeasure, built.pre);
1511 return view;
1512 }
1513
1514 // Get a {top, bottom, left, right} box (in line-local coordinates)
1515 // for a given character.

Callers 1

prepareMeasureForLineFunction · 0.85

Calls 4

visualLineFunction · 0.85
lineNoFunction · 0.85
buildLineContentFunction · 0.85
removeChildrenAndAddFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…