MCPcopy Index your code
hub / github.com/TruthHun/BookStack / updateLineForChanges

Function updateLineForChanges

static/mergely/lib/codemirror.js:894–903  ·  view source on GitHub ↗
(cm, lineView, lineN, dims)

Source from the content-addressed store, hash-verified

892 // lineView.changes. This updates the relevant part of the line's
893 // DOM structure.
894 function updateLineForChanges(cm, lineView, lineN, dims) {
895 for (var j = 0; j < lineView.changes.length; j++) {
896 var type = lineView.changes[j];
897 if (type == "text") updateLineText(cm, lineView);
898 else if (type == "gutter") updateLineGutter(cm, lineView, lineN, dims);
899 else if (type == "class") updateLineClasses(lineView);
900 else if (type == "widget") updateLineWidgets(cm, lineView, dims);
901 }
902 lineView.changes = null;
903 }
904
905 // Lines with gutter elements, widgets or a background class need to
906 // be wrapped, and have the extra elements added to the wrapper div

Callers 2

patchDisplayFunction · 0.70
prepareMeasureForLineFunction · 0.70

Calls 4

updateLineTextFunction · 0.70
updateLineGutterFunction · 0.70
updateLineClassesFunction · 0.70
updateLineWidgetsFunction · 0.70

Tested by

no test coverage detected