提交 938d587d 编写于 作者: M Mr.doob

TransformControls: Fixed touchend bug.

上级 1c8647d1
...@@ -1101,20 +1101,35 @@ ...@@ -1101,20 +1101,35 @@
function onPointerUp( event ) { function onPointerUp( event ) {
event.preventDefault(); // Prevent MouseEvent on mobile
if ( event.button !== undefined && event.button !== 0 ) return; if ( event.button !== undefined && event.button !== 0 ) return;
if ( _dragging && ( scope.axis !== null ) ) { if ( _dragging && ( scope.axis !== null ) ) {
mouseUpEvent.mode = _mode; mouseUpEvent.mode = _mode;
scope.dispatchEvent( mouseUpEvent ) scope.dispatchEvent( mouseUpEvent );
} }
_dragging = false; _dragging = false;
if ( event instanceof TouchEvent ) {
// Force "rollover"
scope.axis = null;
scope.update();
scope.dispatchEvent( changeEvent );
} else {
onPointerHover( event ); onPointerHover( event );
} }
}
function intersectObjects( pointer, objects ) { function intersectObjects( pointer, objects ) {
var rect = domElement.getBoundingClientRect(); var rect = domElement.getBoundingClientRect();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册