diff --git a/ShadowEditor.Web/src/editor/Editor.js b/ShadowEditor.Web/src/editor/Editor.js index 48163ad6..7e38cf03 100644 --- a/ShadowEditor.Web/src/editor/Editor.js +++ b/ShadowEditor.Web/src/editor/Editor.js @@ -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); } }; diff --git a/ShadowEditor.Web/src/event/PickEvent.js b/ShadowEditor.Web/src/event/PickEvent.js index 86c98d03..7a51201b 100644 --- a/ShadowEditor.Web/src/event/PickEvent.js +++ b/ShadowEditor.Web/src/event/PickEvent.js @@ -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();