From 3db66134d423780238f57e534dd5663816ec3018 Mon Sep 17 00:00:00 2001 From: "Mr.doob" Date: Wed, 4 Nov 2015 21:46:31 -0500 Subject: [PATCH] Editor: Cleaned up History panel. --- editor/js/Sidebar.History.js | 9 ++++----- editor/js/Sidebar.js | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/editor/js/Sidebar.History.js b/editor/js/Sidebar.History.js index ecb1bfde8f..d93b4ae76a 100755 --- a/editor/js/Sidebar.History.js +++ b/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 ); } ); diff --git a/editor/js/Sidebar.js b/editor/js/Sidebar.js index b339067839..4219e15845 100644 --- a/editor/js/Sidebar.js +++ b/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 ) ); -- GitLab