From b2402f58d37d1a802db056f2bc83104f836ae31d Mon Sep 17 00:00:00 2001 From: liteng <930372551@qq.com> Date: Sun, 25 Nov 2018 14:15:58 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=AA=E5=85=81=E8=AE=B8=E5=B7=A6=E9=94=AE?= =?UTF-8?q?=E9=80=89=E4=B8=AD=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ShadowEditor.Web/src/editor/Editor.js | 2 +- ShadowEditor.Web/src/event/PickEvent.js | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) 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();