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

Function positionLineWidget

static/editor.md/lib/codemirror/lib/codemirror.js:1030–1046  ·  view source on GitHub ↗
(widget, node, lineView, dims)

Source from the content-addressed store, hash-verified

1028 }
1029
1030 function positionLineWidget(widget, node, lineView, dims) {
1031 if (widget.noHScroll) {
1032 (lineView.alignable || (lineView.alignable = [])).push(node);
1033 var width = dims.wrapperWidth;
1034 node.style.left = dims.fixedPos + "px";
1035 if (!widget.coverGutter) {
1036 width -= dims.gutterTotalWidth;
1037 node.style.paddingLeft = dims.gutterTotalWidth + "px";
1038 }
1039 node.style.width = width + "px";
1040 }
1041 if (widget.coverGutter) {
1042 node.style.zIndex = 5;
1043 node.style.position = "relative";
1044 if (!widget.noHScroll) node.style.marginLeft = -dims.gutterTotalWidth + "px";
1045 }
1046 }
1047
1048 // POSITION OBJECT
1049

Callers 1

insertLineWidgetsForFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected