未验证 提交 7de3906e 编写于 作者: P Pascal Häusler 提交者: GitHub

TransformControls: Set axis before triggering mouseDownEvent

In my case for example I have a listener to the mousedown event. In this listener I check for the current set axis. But of course it is ```null``` because it is set just after the event was triggered.
So my suggestion is to set the axis and AFTERWARDS trigger the event.
上级 d381e6cc
......@@ -856,10 +856,10 @@
event.preventDefault();
event.stopPropagation();
scope.dispatchEvent( mouseDownEvent );
scope.axis = intersect.object.name;
scope.dispatchEvent( mouseDownEvent );
scope.update();
eye.copy( camPosition ).sub( worldPosition ).normalize();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册