MCPcopy
hub / github.com/DHTMLX/gantt / updateLineForChanges

Function updateLineForChanges

samples/common/codehighlight/codemirror.js:2092–2101  ·  view source on GitHub ↗
(cm, lineView, lineN, dims)

Source from the content-addressed store, hash-verified

2090 // lineView.changes. This updates the relevant part of the line's
2091 // DOM structure.
2092 function updateLineForChanges(cm, lineView, lineN, dims) {
2093 for (var j = 0; j < lineView.changes.length; j++) {
2094 var type = lineView.changes[j];
2095 if (type == "text") { updateLineText(cm, lineView); }
2096 else if (type == "gutter") { updateLineGutter(cm, lineView, lineN, dims); }
2097 else if (type == "class") { updateLineClasses(cm, lineView); }
2098 else if (type == "widget") { updateLineWidgets(cm, lineView, dims); }
2099 }
2100 lineView.changes = null;
2101 }
2102
2103 // Lines with gutter elements, widgets or a background class need to
2104 // be wrapped, and have the extra elements added to the wrapper div

Callers 2

prepareMeasureForLineFunction · 0.85
patchDisplayFunction · 0.85

Calls 4

updateLineTextFunction · 0.85
updateLineGutterFunction · 0.85
updateLineClassesFunction · 0.85
updateLineWidgetsFunction · 0.85

Tested by

no test coverage detected