MCPcopy
hub / github.com/witheve/Eve / widgetHeight

Function widgetHeight

src/codemirror.js:6698–6711  ·  view source on GitHub ↗
(widget)

Source from the content-addressed store, hash-verified

6696 };
6697
6698 function widgetHeight(widget) {
6699 if (widget.height != null) return widget.height;
6700 var cm = widget.doc.cm;
6701 if (!cm) return 0;
6702 if (!contains(document.body, widget.node)) {
6703 var parentStyle = "position: relative;";
6704 if (widget.coverGutter)
6705 parentStyle += "margin-left: -" + cm.display.gutters.offsetWidth + "px;";
6706 if (widget.noHScroll)
6707 parentStyle += "width: " + cm.display.wrapper.clientWidth + "px;";
6708 removeChildrenAndAdd(cm.display.measure, elt("div", [widget.node], null, parentStyle));
6709 }
6710 return widget.height = widget.node.parentNode.offsetHeight;
6711 }
6712
6713 function addLineWidget(doc, handle, node, options) {
6714 var widget = new LineWidget(doc, node, options);

Callers 3

intoCoordSystemFunction · 0.85
codemirror.jsFile · 0.85
addLineWidgetFunction · 0.85

Calls 2

removeChildrenAndAddFunction · 0.85
eltFunction · 0.85

Tested by

no test coverage detected