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

Function insertLineWidgetsFor

GUI/codemirror/lib/codemirror.js:904–917  ·  view source on GitHub ↗
(line, lineView, dims, allowAbove)

Source from the content-addressed store, hash-verified

902 }
903
904 function insertLineWidgetsFor(line, lineView, dims, allowAbove) {
905 if (!line.widgets) return;
906 var wrap = ensureLineWrapped(lineView);
907 for (var i = 0, ws = line.widgets; i < ws.length; ++i) {
908 var widget = ws[i], node = elt("div", [widget.node], "CodeMirror-linewidget");
909 if (!widget.handleMouseEvents) node.ignoreEvents = true;
910 positionLineWidget(widget, node, lineView, dims);
911 if (allowAbove && widget.above)
912 wrap.insertBefore(node, lineView.gutter || lineView.text);
913 else
914 wrap.appendChild(node);
915 signalLater(widget, "redraw");
916 }
917 }
918
919 function positionLineWidget(widget, node, lineView, dims) {
920 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

Used in the wild real call sites across dependent graphs

searching dependent graphs…