MCPcopy
hub / github.com/csev/py4e / insertLineWidgetsFor

Function insertLineWidgetsFor

tools/pythonauto/static/codemirrorepl/codemirror.js:889–902  ·  view source on GitHub ↗
(line, lineView, dims, allowAbove)

Source from the content-addressed store, hash-verified

887 }
888
889 function insertLineWidgetsFor(line, lineView, dims, allowAbove) {
890 if (!line.widgets) return;
891 var wrap = ensureLineWrapped(lineView);
892 for (var i = 0, ws = line.widgets; i < ws.length; ++i) {
893 var widget = ws[i], node = elt("div", [widget.node], "CodeMirror-linewidget");
894 if (!widget.handleMouseEvents) node.ignoreEvents = true;
895 positionLineWidget(widget, node, lineView, dims);
896 if (allowAbove && widget.above)
897 wrap.insertBefore(node, lineView.gutter || lineView.text);
898 else
899 wrap.appendChild(node);
900 signalLater(widget, "redraw");
901 }
902 }
903
904 function positionLineWidget(widget, node, lineView, dims) {
905 if (widget.noHScroll) {

Callers 1

insertLineWidgetsFunction · 0.85

Calls 6

ensureLineWrappedFunction · 0.85
eltFunction · 0.70
positionLineWidgetFunction · 0.70
signalLaterFunction · 0.70
insertBeforeMethod · 0.45
appendChildMethod · 0.45

Tested by

no test coverage detected