MCPcopy
hub / github.com/nwutils/nw-sample-apps / add

Function add

mini-code-edit/cm/lib/codemirror.js:1141–1146  ·  view source on GitHub ↗
(left, top, right, height)

Source from the content-addressed store, hash-verified

1139 var clientWidth = lineSpace.clientWidth || lineSpace.offsetWidth;
1140 var clientHeight = lineSpace.clientHeight || lineSpace.offsetHeight;
1141 function add(left, top, right, height) {
1142 var rstyle = quirksMode ? "width: " + (!right ? clientWidth : clientWidth - right - left) + "px"
1143 : "right: " + right + "px";
1144 html += '<div class="CodeMirror-selected" style="position: absolute; left: ' + left +
1145 'px; top: ' + top + 'px; ' + rstyle + '; height: ' + height + 'px"></div>';
1146 }
1147 if (sel.from.ch && fromPos.y >= 0) {
1148 var right = sameLine ? clientWidth - toPos.x : 0;
1149 add(fromPos.x, fromPos.y, right, th);

Callers 2

updateSelectionFunction · 0.70
markTextFunction · 0.70

Calls 1

getLineFunction · 0.85

Tested by

no test coverage detected