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

Function showCrossHair

static/mergely/lib/codemirror.js:4184–4197  ·  view source on GitHub ↗
(cm)

Source from the content-addressed store, hash-verified

4182 }
4183
4184 function showCrossHair(cm) {
4185 var lineDiv = cm.display.lineDiv;
4186 addClass(lineDiv, "CodeMirror-crosshair");
4187
4188 function up(e) {
4189 if (e.keyCode == 18 || !e.altKey) {
4190 rmClass(lineDiv, "CodeMirror-crosshair");
4191 off(document, "keyup", up);
4192 off(document, "mouseover", up);
4193 }
4194 }
4195 on(document, "keyup", up);
4196 on(document, "mouseover", up);
4197 }
4198
4199 function onKeyUp(e) {
4200 if (e.keyCode == 16) this.doc.sel.shift = false;

Callers 1

onKeyDownFunction · 0.70

Calls 2

addClassFunction · 0.50
onFunction · 0.50

Tested by

no test coverage detected