Browse Source

Editor: BufferGeometry Attributes clean up.

Mr.doob 7 years ago
parent
commit
00cd9a27e5
1 changed files with 12 additions and 8 deletions
  1. 12 8
      editor/js/Sidebar.Geometry.BufferGeometry.js

+ 12 - 8
editor/js/Sidebar.Geometry.BufferGeometry.js

@@ -20,14 +20,19 @@ Sidebar.Geometry.BufferGeometry = function ( editor ) {
 			container.clear();
 			container.setDisplay( 'block' );
 
+			var text = new UI.Text( 'Attributes' ).setWidth( '90px' );
+			container.add( text );
+
+			var container2 = new UI.Span().setDisplay( 'inline-block' ).setWidth( '160px' );
+			container.add( container2 );
+
 			var index = geometry.index;
 
 			if ( index !== null ) {
 
-				var panel = new UI.Row();
-				panel.add( new UI.Text( 'index' ).setWidth( '90px' ) );
-				panel.add( new UI.Text( ( index.count ).format() ).setFontSize( '12px' ) );
-				container.add( panel );
+				container2.add( new UI.Text( 'index' ).setWidth( '80px' ) );
+				container2.add( new UI.Text( ( index.count ).format() ).setFontSize( '12px' ) );
+				container2.add( new UI.Break() );
 
 			}
 
@@ -37,10 +42,9 @@ Sidebar.Geometry.BufferGeometry = function ( editor ) {
 
 				var attribute = attributes[ name ];
 
-				var panel = new UI.Row();
-				panel.add( new UI.Text( name ).setWidth( '90px' ) );
-				panel.add( new UI.Text( ( attribute.count ).format() + ' (' + attribute.itemSize + ')' ).setFontSize( '12px' ) );
-				container.add( panel );
+				container2.add( new UI.Text( name ).setWidth( '80px' ) );
+				container2.add( new UI.Text( ( attribute.count ).format() + ' (' + attribute.itemSize + ')' ).setFontSize( '12px' ) );
+				container2.add( new UI.Break() );
 
 			}