MCPcopy Index your code
hub / github.com/DHTMLX/gantt / configureMouse

Function configureMouse

samples/common/codehighlight/codemirror.js:7350–7361  ·  view source on GitHub ↗
(cm, repeat, event)

Source from the content-addressed store, hash-verified

7348 }
7349
7350 function configureMouse(cm, repeat, event) {
7351 var option = cm.getOption("configureMouse");
7352 var value = option ? option(cm, repeat, event) : {};
7353 if (value.unit == null) {
7354 var rect = chromeOS ? event.shiftKey && event.metaKey : event.altKey;
7355 value.unit = rect ? "rectangle" : repeat == "single" ? "char" : repeat == "double" ? "word" : "line";
7356 }
7357 if (value.extend == null || cm.doc.extend) { value.extend = cm.doc.extend || event.shiftKey; }
7358 if (value.addNew == null) { value.addNew = mac ? event.metaKey : event.ctrlKey; }
7359 if (value.moveOnDrag == null) { value.moveOnDrag = !(mac ? event.altKey : event.ctrlKey); }
7360 return value
7361 }
7362
7363 function leftButtonDown(cm, pos, repeat, event) {
7364 if (ie) { setTimeout(bind(ensureFocus, cm), 0); }

Callers 1

leftButtonDownFunction · 0.85

Calls 1

optionFunction · 0.85

Tested by

no test coverage detected