提交 3db66134 编写于 作者: M Mr.doob

Editor: Cleaned up History panel.

上级 aacde82d
......@@ -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 );
} );
......
......@@ -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 ) );
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册