只允许左键选中。

This commit is contained in:
liteng 2018-11-25 14:15:58 +08:00
parent 8249687944
commit b2402f58d3
2 changed files with 5 additions and 1 deletions

View File

@ -407,7 +407,7 @@ Editor.prototype.onMouseDown = function (event) {
var intersect = this.raycaster.intersectObjects(this.scene.children, true)[0];
if (intersect) {
this.app.call(`intersect`, this, intersect);
this.app.call(`intersect`, this, intersect, event);
}
};

View File

@ -34,6 +34,10 @@ PickEvent.prototype.stop = function () {
};
PickEvent.prototype.onMouseDown = function (event) {
if (event.button !== 0) { // 只允许左键选中
return;
}
var container = this.app.viewport.container;
event.preventDefault();