Browse Source

Editor: Displaying axis for all objects even if they don't have geometry.

Mr.doob 12 years ago
parent
commit
474d14d21b
1 changed files with 3 additions and 11 deletions
  1. 3 11
      editor/js/ui/Viewport.js

+ 3 - 11
editor/js/ui/Viewport.js

@@ -518,7 +518,6 @@ var Viewport = function ( signals ) {
 		selectionAxis.visible = false;
 
 		var geometry;
-		var hasRotation;
 
 		if ( object !== null ) {
 
@@ -527,15 +526,16 @@ var Viewport = function ( signals ) {
 			if ( object.geometry ) {
 
 				geometry = object.geometry;
-				hasRotation = true;
 
 			} else if ( object.properties.pickingProxy ) {
 
 				geometry = object.properties.pickingProxy.geometry;
-				hasRotation = false;
 
 			}
 
+			selectionAxis.matrixWorld = object.matrixWorld;
+			selectionAxis.visible = true;
+
 		}
 
 		if ( geometry ) {
@@ -584,18 +584,10 @@ var Viewport = function ( signals ) {
 			selectionBox.geometry.verticesNeedUpdate = true;
 
 			selectionBox.matrixWorld = object.matrixWorld;
-			selectionAxis.matrixWorld = object.matrixWorld;
-
 			selectionBox.visible = true;
 
 		}
 
-		if ( hasRotation ) {
-
-			selectionAxis.visible = true;
-
-		}
-
 		render();
 
 	} );