(e)
| 16395 | } |
| 16396 | |
| 16397 | function onMouseDown(e) { |
| 16398 | var ev = e.domEvent; |
| 16399 | var alt = ev.altKey; |
| 16400 | var shift = ev.shiftKey; |
| 16401 | var ctrl = ev.ctrlKey; |
| 16402 | var accel = e.getAccelKey(); |
| 16403 | var button = e.getButton(); |
| 16404 | |
| 16405 | if (ctrl && useragent.isMac) |
| 16406 | button = ev.button; |
| 16407 | |
| 16408 | if (e.editor.inMultiSelectMode && button == 2) { |
| 16409 | e.editor.textInput.onContextMenu(e.domEvent); |
| 16410 | return; |
| 16411 | } |
| 16412 | |
| 16413 | if (!ctrl && !alt && !accel) { |
| 16414 | if (button === 0 && e.editor.inMultiSelectMode) |
| 16415 | e.editor.exitMultiSelectMode(); |
| 16416 | return; |
| 16417 | } |
| 16418 | |
| 16419 | if (button !== 0) |
| 16420 | return; |
| 16421 | |
| 16422 | var editor = e.editor; |
| 16423 | var selection = editor.selection; |
| 16424 | var isMultiSelect = editor.inMultiSelectMode; |
| 16425 | var pos = e.getDocumentPosition(); |
| 16426 | var cursor = selection.getCursor(); |
| 16427 | var inSelection = e.inSelection() || (selection.isEmpty() && isSamePoint(pos, cursor)); |
| 16428 | |
| 16429 | var mouseX = e.x, mouseY = e.y; |
| 16430 | var onMouseSelection = function(e) { |
| 16431 | mouseX = e.clientX; |
| 16432 | mouseY = e.clientY; |
| 16433 | }; |
| 16434 | |
| 16435 | var session = editor.session; |
| 16436 | var screenAnchor = editor.renderer.pixelToScreenCoordinates(mouseX, mouseY); |
| 16437 | var screenCursor = screenAnchor; |
| 16438 | |
| 16439 | var selectionMode; |
| 16440 | if (editor.$mouseHandler.$enableJumpToDef) { |
| 16441 | if (ctrl && alt || accel && alt) |
| 16442 | selectionMode = "add"; |
| 16443 | else if (alt) |
| 16444 | selectionMode = "block"; |
| 16445 | } else { |
| 16446 | if (accel && !alt) { |
| 16447 | selectionMode = "add"; |
| 16448 | if (!isMultiSelect && shift) |
| 16449 | return; |
| 16450 | } else if (alt) { |
| 16451 | selectionMode = "block"; |
| 16452 | } |
| 16453 | } |
| 16454 |
nothing calls this directly
no test coverage detected