File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -86,13 +86,20 @@ class Toolbar extends Container {
8686 afterSetDock ( value , oldValue ) {
8787 let me = this ,
8888 { cls} = me ,
89- dockPositions = me . getStaticConfig ( 'dockPositions' ) ;
89+ dockPositions = me . getStaticConfig ( 'dockPositions' ) ,
90+ layoutConfig = me . getLayoutConfig ( ) ;
9091
9192 dockPositions . forEach ( key => {
9293 key !== null && NeoArray . toggle ( cls , 'neo-dock-' + key , key === value )
9394 } ) ;
9495
95- me . set ( { cls, layout : me . getLayoutConfig ( ) } )
96+ if ( ! me . layout ) {
97+ layoutConfig . ntype = 'flexbox' ;
98+ me . set ( { cls, layout : layoutConfig } )
99+ } else {
100+ me . layout . set ( layoutConfig ) ;
101+ me . cls = cls ;
102+ }
96103 }
97104
98105 /**
@@ -169,22 +176,20 @@ class Toolbar extends Container {
169176 case 'bottom' :
170177 case 'top' :
171178 layoutConfig = {
172- ntype : 'hbox ' ,
173- align : 'center ' ,
174- pack : 'start'
179+ align : 'center ' ,
180+ direction : 'row ' ,
181+ pack : 'start'
175182 } ;
176183 break
177184 case 'left' :
178185 layoutConfig = {
179- ntype : 'vbox' ,
180186 align : 'center' ,
181187 direction : 'column-reverse' ,
182188 pack : 'start'
183189 } ;
184190 break
185191 case 'right' :
186192 layoutConfig = {
187- ntype : 'vbox' ,
188193 align : 'center' ,
189194 direction : 'column' ,
190195 pack : 'start'
You can’t perform that action at this time.
0 commit comments