浏览代码

Editor: Simplified Outliner padding.

Mr.doob 9 年之前
父节点
当前提交
d32cd00f89
共有 1 个文件被更改,包括 5 次插入4 次删除
  1. 5 4
      editor/js/Sidebar.Scene.js

+ 5 - 4
editor/js/Sidebar.Scene.js

@@ -148,7 +148,8 @@ Sidebar.Scene = function ( editor ) {
 
 
 				var object = objects[ i ];
 				var object = objects[ i ];
 
 
-				var html = pad + '<span class="type ' + object.type + '"></span> ' + object.name;
+				var html = '<span style="margin-right:' + pad + 'px"></span>';
+				html += '<span class="type ' + object.type + '"></span> ' + object.name;
 
 
 				if ( object instanceof THREE.Mesh ) {
 				if ( object instanceof THREE.Mesh ) {
 
 
@@ -164,11 +165,11 @@ Sidebar.Scene = function ( editor ) {
 
 
 				options.push( { value: object.id, html: html } );
 				options.push( { value: object.id, html: html } );
 
 
-				addObjects( object.children, pad + '&nbsp;&nbsp;&nbsp;' );
+				addObjects( object.children, pad + 10 );
 
 
 			}
 			}
 
 
-		} )( scene.children, '&nbsp;&nbsp;&nbsp;' );
+		} )( scene.children, 0 );
 
 
 		outliner.setOptions( options );
 		outliner.setOptions( options );
 
 
@@ -232,4 +233,4 @@ Sidebar.Scene = function ( editor ) {
 
 
 	return container;
 	return container;
 
 
-}
+};