123456789101112131415161718192021222324252627282930313233343536 |
- Sidebar.Script = function ( editor ) {
- var signals = editor.signals;
- var container = new UI.CollapsiblePanel();
- container.setCollapsed( editor.config.getKey( 'ui/sidebar/script/collapsed' ) );
- container.onCollapsedChange( function ( boolean ) {
- editor.config.setKey( 'ui/sidebar/script/collapsed', boolean );
- } );
- container.setDisplay( 'none' );
- container.addStatic( new UI.Text( 'Script' ).setTextTransform( 'uppercase' ) );
- container.add( new UI.Break() );
- var scriptsRow = new UI.Panel();
- container.add( scriptsRow );
- signals.objectSelected.add( function ( object ) {
- if ( object !== null ) {
- container.setDisplay( 'block' );
- } else {
- container.setDisplay( 'none' );
- }
- } );
- return container;
- }
|