@@ -136,34 +136,38 @@ class LayoutManager extends Component {
136136 if ( tabset === undefined ) {
137137 this . createTabSet ( widgetConfiguration . panelName )
138138 }
139- this . refs . layout . addTabToTabSet ( widgetConfiguration . panelName , widget2Node ( widgetConfiguration ) )
139+ if ( widgetConfiguration . status === WidgetStatus . BORDER ) {
140+ this . refs . layout . addTabToTabSet ( 'border_bottom' , widget2Node ( widgetConfiguration ) )
141+ } else {
142+ this . refs . layout . addTabToTabSet ( widgetConfiguration . panelName , widget2Node ( widgetConfiguration ) )
143+ }
144+
140145 }
141146
142147 createTabSet ( tabsetID ) {
143148 // In case the tabset doesn't exist
144149 const model = this . getModel ( )
145150 const rootNode = model . getNodeById ( "root" )
146151
147- const pyPanel = model . getNodeById ( 'consolePanel' )
148- if ( pyPanel ) {
149- pyPanel . _setWeight ( 20 )
150- }
151-
152152 let hrow = new FlexLayout . RowNode ( model , { } ) ;
153153 hrow . _setWeight ( 100 )
154154
155155 const tabset = new FlexLayout . TabSetNode ( model , { id : tabsetID } ) ;
156156 tabset . _setWeight ( 80 )
157-
157+
158158 hrow . _addChild ( tabset )
159-
160- rootNode . getChildren ( ) . forEach ( child => hrow . _addChild ( child ) )
159+
160+ rootNode . getChildren ( ) . forEach ( child => {
161+ const newWeight = child . getWeight ( ) / 2
162+ child . _setWeight ( newWeight )
163+ hrow . _addChild ( child )
164+ } )
165+
161166 rootNode . _removeAll ( )
162167 rootNode . _addChild ( hrow , 0 ) ;
163168 if ( ! this . props . editMode && tabsetID === 'plotPanel' ) {
164169 // We need to resize Geppetto 3D canvas to new panel sizes
165170 setTimeout ( ( ) => window . dispatchEvent ( new Event ( 'resize' ) ) , 1000 )
166-
167171 }
168172 }
169173
0 commit comments