MCPcopy Create free account
hub / github.com/TruthHun/BookStack / updateExternalMeasurement

Function updateExternalMeasurement

static/mergely/lib/codemirror.js:2571–2580  ·  view source on GitHub ↗
(cm, line)

Source from the content-addressed store, hash-verified

2569 // Render a line into the hidden node display.externalMeasured. Used
2570 // when measurement is needed for a line that's not in the viewport.
2571 function updateExternalMeasurement(cm, line) {
2572 line = visualLine(line);
2573 var lineN = lineNo(line);
2574 var view = cm.display.externalMeasured = new LineView(cm.doc, line, lineN);
2575 view.lineN = lineN;
2576 var built = view.built = buildLineContent(cm, view);
2577 view.text = built.pre;
2578 removeChildrenAndAdd(cm.display.lineMeasure, built.pre);
2579 return view;
2580 }
2581
2582 // Get a {top, bottom, left, right} box (in line-local coordinates)
2583 // for a given character.

Callers 1

prepareMeasureForLineFunction · 0.70

Calls 4

visualLineFunction · 0.70
lineNoFunction · 0.70
buildLineContentFunction · 0.70
removeChildrenAndAddFunction · 0.70

Tested by

no test coverage detected