提交 0df9a024 编写于 作者: C Catouse

* improve selectable component.

上级 ee0872be
...@@ -192,7 +192,7 @@ ...@@ -192,7 +192,7 @@
}; };
var mousedown = function(e) { var mousedown = function(e) {
if(that.callEvent('start', e) === false) { if(that.altKey || e.which === 3 || that.callEvent('start', e) === false) {
return; return;
} }
...@@ -211,6 +211,10 @@ ...@@ -211,6 +211,10 @@
}); });
} }
if(that.callEvent('startDrag', e) === false) {
return;
}
startX = e.pageX; startX = e.pageX;
startY = e.pageY; startY = e.pageY;
...@@ -231,8 +235,10 @@ ...@@ -231,8 +235,10 @@
$(document).on('keydown', function(e) { $(document).on('keydown', function(e) {
var code = e.keyCode; var code = e.keyCode;
if(code === 17 || code == 91) that.multiKey = code; if(code === 17 || code == 91) that.multiKey = code;
else if(code === 18) that.altKey = true;
}).on('keyup', function(e) { }).on('keyup', function(e) {
that.multiKey = false; that.multiKey = false;
that.altKey = false;
}); });
}; };
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册