Browse Source

Removed unused loop from TransformControls.

AKI RODIC 7 years ago
parent
commit
208233d0e0
1 changed files with 4 additions and 6 deletions
  1. 4 6
      examples/js/controls/TransformControls.js

+ 4 - 6
examples/js/controls/TransformControls.js

@@ -1324,12 +1324,10 @@ THREE.TransformControlsGizmo = function () {
 			}
 
 			// Hide disabled axes
-			for ( var a in handle.name ) {
-				handle.visible = handle.visible && ( handle.name.indexOf( "X" ) === -1 || this.showX );
-				handle.visible = handle.visible && ( handle.name.indexOf( "Y" ) === -1 || this.showY );
-				handle.visible = handle.visible && ( handle.name.indexOf( "Z" ) === -1 || this.showZ );
-				handle.visible = handle.visible && ( handle.name.indexOf( "E" ) === -1 || ( this.showX && this.showY && this.showZ ) );
-			}
+			handle.visible = handle.visible && ( handle.name.indexOf( "X" ) === -1 || this.showX );
+			handle.visible = handle.visible && ( handle.name.indexOf( "Y" ) === -1 || this.showY );
+			handle.visible = handle.visible && ( handle.name.indexOf( "Z" ) === -1 || this.showZ );
+			handle.visible = handle.visible && ( handle.name.indexOf( "E" ) === -1 || ( this.showX && this.showY && this.showZ ) );
 
 			// highlight selected axis