提交 2a29bd2b 编写于 作者: M Mr.doob

Updated generated jsm files.

上级 822530be
......@@ -546,32 +546,44 @@ var OrbitControls = function ( object, domElement ) {
function handleKeyDown( event ) {
//console.log( 'handleKeyDown' );
// console.log( 'handleKeyDown' );
var needsUpdate = false;
switch ( event.keyCode ) {
case scope.keys.UP:
pan( 0, scope.keyPanSpeed );
scope.update();
needsUpdate = true;
break;
case scope.keys.BOTTOM:
pan( 0, - scope.keyPanSpeed );
scope.update();
needsUpdate = true;
break;
case scope.keys.LEFT:
pan( scope.keyPanSpeed, 0 );
scope.update();
needsUpdate = true;
break;
case scope.keys.RIGHT:
pan( - scope.keyPanSpeed, 0 );
scope.update();
needsUpdate = true;
break;
}
if ( needsUpdate ) {
// prevent the browser from scrolling on cursor keys
event.preventDefault();
scope.update();
}
}
function handleTouchStartRotate( event ) {
......@@ -682,8 +694,15 @@ var OrbitControls = function ( object, domElement ) {
if ( scope.enabled === false ) return;
// Prevent the browser from scrolling.
event.preventDefault();
// Manually set the focus since calling preventDefault above
// prevents the browser from setting it automatically.
scope.domElement.focus ? scope.domElement.focus() : window.focus();
switch ( event.button ) {
case scope.mouseButtons.LEFT:
......
......@@ -499,7 +499,7 @@ var TrackballControls = function ( object, domElement ) {
function touchstart( event ) {
if ( _this.enabled === false ) return;
event.preventDefault();
switch ( event.touches.length ) {
......
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册