提交 7be6e2a4 编写于 作者: M Mr.doob

Editor: Fixed Script panel behaviour.

上级 9e48b82a
......@@ -4,6 +4,7 @@ Sidebar.Script = function ( editor ) {
var container = new UI.CollapsiblePanel();
container.setCollapsed( true );
container.setDisplay( 'none' );
container.addStatic( new UI.Text( 'Script' ).setTextTransform( 'uppercase' ) );
container.add( new UI.Break() );
......@@ -11,6 +12,20 @@ Sidebar.Script = function ( editor ) {
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;
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册