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

Function widgetHeight

samples/common/codehighlight/codemirror.js:2273–2286  ·  view source on GitHub ↗
(widget)

Source from the content-addressed store, hash-verified

2271 }
2272
2273 function widgetHeight(widget) {
2274 if (widget.height != null) { return widget.height }
2275 var cm = widget.doc.cm;
2276 if (!cm) { return 0 }
2277 if (!contains(document.body, widget.node)) {
2278 var parentStyle = "position: relative;";
2279 if (widget.coverGutter)
2280 { parentStyle += "margin-left: -" + cm.display.gutters.offsetWidth + "px;"; }
2281 if (widget.noHScroll)
2282 { parentStyle += "width: " + cm.display.wrapper.clientWidth + "px;"; }
2283 removeChildrenAndAdd(cm.display.measure, elt("div", [widget.node], null, parentStyle));
2284 }
2285 return widget.height = widget.node.parentNode.offsetHeight
2286 }
2287
2288 // Return true when the given mouse event happened in a widget
2289 function eventInWidget(display, e) {

Callers 3

widgetTopHeightFunction · 0.85
codemirror.jsFile · 0.85
addLineWidgetFunction · 0.85

Calls 3

containsFunction · 0.85
removeChildrenAndAddFunction · 0.85
eltFunction · 0.85

Tested by

no test coverage detected