MCPcopy Create free account
hub / github.com/TextGeneratorio/text-generator.io / positionLineWidget

Function positionLineWidget

static/libs/codemirror.js:2323–2339  ·  view source on GitHub ↗
(widget, node, lineView, dims)

Source from the content-addressed store, hash-verified

2321}
2322
2323function positionLineWidget(widget, node, lineView, dims) {
2324 if (widget.noHScroll) {
2325 (lineView.alignable || (lineView.alignable = [])).push(node);
2326 var width = dims.wrapperWidth;
2327 node.style.left = dims.fixedPos + "px";
2328 if (!widget.coverGutter) {
2329 width -= dims.gutterTotalWidth;
2330 node.style.paddingLeft = dims.gutterTotalWidth + "px";
2331 }
2332 node.style.width = width + "px";
2333 }
2334 if (widget.coverGutter) {
2335 node.style.zIndex = 5;
2336 node.style.position = "relative";
2337 if (!widget.noHScroll) { node.style.marginLeft = -dims.gutterTotalWidth + "px"; }
2338 }
2339}
2340
2341function widgetHeight(widget) {
2342 if (widget.height != null) { return widget.height }

Callers 1

insertLineWidgetsForFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected