MCPcopy Index your code
hub / github.com/DHTMLX/gantt / insertLineWidgetsFor

Function insertLineWidgetsFor

samples/common/codehighlight/codemirror.js:2239–2253  ·  view source on GitHub ↗
(cm, line, lineView, dims, allowAbove)

Source from the content-addressed store, hash-verified

2237 }
2238
2239 function insertLineWidgetsFor(cm, line, lineView, dims, allowAbove) {
2240 if (!line.widgets) { return }
2241 var wrap = ensureLineWrapped(lineView);
2242 for (var i = 0, ws = line.widgets; i < ws.length; ++i) {
2243 var widget = ws[i], node = elt("div", [widget.node], "CodeMirror-linewidget" + (widget.className ? " " + widget.className : ""));
2244 if (!widget.handleMouseEvents) { node.setAttribute("cm-ignore-events", "true"); }
2245 positionLineWidget(widget, node, lineView, dims);
2246 cm.display.input.setUneditable(node);
2247 if (allowAbove && widget.above)
2248 { wrap.insertBefore(node, lineView.gutter || lineView.text); }
2249 else
2250 { wrap.appendChild(node); }
2251 signalLater(widget, "redraw");
2252 }
2253 }
2254
2255 function positionLineWidget(widget, node, lineView, dims) {
2256 if (widget.noHScroll) {

Callers 1

insertLineWidgetsFunction · 0.85

Calls 4

ensureLineWrappedFunction · 0.85
eltFunction · 0.85
positionLineWidgetFunction · 0.85
signalLaterFunction · 0.85

Tested by

no test coverage detected