Explorar o código

Editor: Cleaned up History panel.

Mr.doob %!s(int64=9) %!d(string=hai) anos
pai
achega
3db66134d4
Modificáronse 2 ficheiros con 5 adicións e 6 borrados
  1. 4 5
      editor/js/Sidebar.History.js
  2. 1 1
      editor/js/Sidebar.js

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

@@ -23,15 +23,15 @@ Sidebar.History = function ( editor ) {
 
 	// Checkbox 'Save History'
 
-	var saveHistorySpan = new UI.Span().setPosition( 'absolute' ).setLeft( '180px' ).setFontSize( '13px' );
-	var saveHistoryCheckbox = new UI.Checkbox( config.getKey( 'project/history/stored' ) ).setLeft( '50px' ).onChange( function () {
+	var saveHistorySpan = new UI.Span().setPosition( 'absolute' ).setRight( '8px' );
+	var saveHistoryCheckbox = new UI.Checkbox( config.getKey( 'project/history/stored' ) ).onChange( function () {
 
 		config.setKey( 'project/history/stored', this.getValue() );
 		var saveHistory = this.getValue();
 
 		if ( saveHistory ) {
 
-			alert( 'The history will be preserved across a browser refresh.\nThis can have an impact on performance (mainly when working with textures)!' );
+			alert( 'The history will be preserved across sessions.\nThis can have an impact on performance when working with textures.' );
 
 			var lastUndoCmd = history.undos[ history.undos.length - 1 ];
 			var lastUndoId = ( lastUndoCmd !== undefined ) ? lastUndoCmd.id : 0;
@@ -46,7 +46,6 @@ Sidebar.History = function ( editor ) {
 	} );
 
 	saveHistorySpan.add( saveHistoryCheckbox );
-	saveHistorySpan.add( new UI.Text( 'Save History' ).setPosition( 'relative' ).setLeft( '5px' ) );
 
 	saveHistorySpan.onClick( function ( event ) {
 
@@ -125,7 +124,7 @@ Sidebar.History = function ( editor ) {
 
 	signals.historyChanged.add( refreshUI );
 	signals.historyChanged.add( function ( cmd ) {
-		
+
 		outliner.setValue( cmd !== undefined ? cmd.id : null );
 
 	} );

+ 1 - 1
editor/js/Sidebar.js

@@ -7,8 +7,8 @@ var Sidebar = function ( editor ) {
 	var container = new UI.Panel();
 	container.setId( 'sidebar' );
 
-	container.add( new Sidebar.Project( editor ) );
 	container.add( new Sidebar.History( editor ) );
+	container.add( new Sidebar.Project( editor ) );
 	container.add( new Sidebar.Scene( editor ) );
 	container.add( new Sidebar.Object3D( editor ) );
 	container.add( new Sidebar.Geometry( editor ) );