(widget)
| 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); |
no test coverage detected