do not start drag on ctrl+click
This commit is contained in:
parent
39859015a7
commit
0af6526769
1 changed files with 4 additions and 9 deletions
|
|
@ -109,13 +109,8 @@ function DefaultHandlers(mouseHandler) {
|
|||
// a selection.
|
||||
this.startSelect(pos);
|
||||
} else if (inSelection) {
|
||||
var e = ev.domEvent;
|
||||
if ((e.ctrlKey || e.altKey)) {
|
||||
this.startDrag();
|
||||
} else {
|
||||
this.mousedownEvent.time = (new Date()).getTime();
|
||||
this.setState("dragWait");
|
||||
}
|
||||
this.mousedownEvent.time = (new Date()).getTime();
|
||||
this.setState("dragWait");
|
||||
}
|
||||
|
||||
this.captureMouse(ev);
|
||||
|
|
@ -223,7 +218,7 @@ function DefaultHandlers(mouseHandler) {
|
|||
this.startSelect();
|
||||
};
|
||||
|
||||
this.dragWait = function() {
|
||||
this.dragWait = function(e) {
|
||||
var distance = calcDistance(this.mousedownEvent.x, this.mousedownEvent.y, this.x, this.y);
|
||||
var time = (new Date()).getTime();
|
||||
var editor = this.editor;
|
||||
|
|
@ -231,7 +226,7 @@ function DefaultHandlers(mouseHandler) {
|
|||
if (distance > DRAG_OFFSET) {
|
||||
this.startSelect();
|
||||
} else if (time - this.mousedownEvent.time > editor.getDragDelay()) {
|
||||
this.startDrag()
|
||||
this.startDrag();
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue