MCPcopy Create free account
hub / github.com/TruthHun/BookStack / widgetHeight

Function widgetHeight

static/editor.md/lib/codemirror/lib/codemirror.js:6471–6482  ·  view source on GitHub ↗
(widget)

Source from the content-addressed store, hash-verified

6469 };
6470
6471 function widgetHeight(widget) {
6472 if (widget.height != null) return widget.height;
6473 if (!contains(document.body, widget.node)) {
6474 var parentStyle = "position: relative;";
6475 if (widget.coverGutter)
6476 parentStyle += "margin-left: -" + widget.cm.display.gutters.offsetWidth + "px;";
6477 if (widget.noHScroll)
6478 parentStyle += "width: " + widget.cm.display.wrapper.clientWidth + "px;";
6479 removeChildrenAndAdd(widget.cm.display.measure, elt("div", [widget.node], null, parentStyle));
6480 }
6481 return widget.height = widget.node.offsetHeight;
6482 }
6483
6484 function addLineWidget(cm, handle, node, options) {
6485 var widget = new LineWidget(cm, node, options);

Callers 3

intoCoordSystemFunction · 0.70
codemirror.jsFile · 0.70
addLineWidgetFunction · 0.70

Calls 3

removeChildrenAndAddFunction · 0.70
eltFunction · 0.70
containsFunction · 0.50

Tested by

no test coverage detected