Browse Source

GUI: Shift handling and silly fix.

Mr.doob 13 years ago
parent
commit
f192cf00c0
2 changed files with 4 additions and 4 deletions
  1. 2 2
      gui/js/UI.js
  2. 2 2
      gui/js/ui/Panel.js

+ 2 - 2
gui/js/UI.js

@@ -234,7 +234,7 @@ UI.IntNumber = function ( position ) {
 		var dx = event.screenX - onMouseDownScreenX;
 		var dy = event.screenY - onMouseDownScreenY;
 
-		scope.dom.innerText = ( onMouseDownValue - ( dx - dy ) ).toFixed( 0 ); 
+		scope.dom.innerText = ( onMouseDownValue + ( dx - dy ) / ( event.shiftKey ? 10 : 100 ) ).toFixed( 0 );
 		scope.onChangedCallback();
 
 	}
@@ -314,7 +314,7 @@ UI.FloatNumber = function ( position ) {
 		var dx = event.screenX - onMouseDownScreenX;
 		var dy = event.screenY - onMouseDownScreenY;
 
-		scope.dom.innerText = ( onMouseDownValue + ( dx - dy ) / 100 ).toFixed( 2 ); 
+		scope.dom.innerText = ( onMouseDownValue + ( dx - dy ) / ( event.shiftKey ? 10 : 100 ) ).toFixed( 2 );
 		scope.onChangedCallback();
 
 	}

+ 2 - 2
gui/js/ui/Panel.js

@@ -83,8 +83,8 @@ var Panel = function ( signals ) {
 		if ( selected ) {
 
 			selected.position.x = positionX.getValue();
-			selected.position.y = positionX.getValue();
-			selected.position.z = positionX.getValue();
+			selected.position.y = positionY.getValue();
+			selected.position.z = positionZ.getValue();
 
 			selected.rotation.x = rotationX.getValue();
 			selected.rotation.y = rotationY.getValue();