@@ -257,19 +257,19 @@ function getLayoutAttributes() {
257257 // polar layout attributes
258258 layoutAttributes = assignPolarLayoutAttrs ( layoutAttributes ) ;
259259
260- // add registered components layout attribute
260+ // add registered components layout attributes
261261 Object . keys ( Registry . componentsRegistry ) . forEach ( function ( k ) {
262262 var _module = Registry . componentsRegistry [ k ] ;
263263
264264 if ( ! _module . layoutAttributes ) return ;
265265
266- if ( Array . isArray ( _module . layoutNodes ) ) {
267- _module . layoutNodes . forEach ( function ( v ) {
268- handleRegisteredComponent ( layoutAttributes , _module , v + _module . name ) ;
266+ if ( _module . schema && _module . schema . layout ) {
267+ Object . keys ( _module . schema . layout ) . forEach ( function ( v ) {
268+ insertAttrs ( layoutAttributes , _module . schema . layout [ v ] , v ) ;
269269 } ) ;
270270 }
271271 else {
272- handleRegisteredComponent ( layoutAttributes , _module , _module . name ) ;
272+ insertAttrs ( layoutAttributes , _module . layoutAttributes , _module . name ) ;
273273 }
274274 } ) ;
275275
@@ -366,9 +366,8 @@ function handleBasePlotModule(layoutAttributes, _module, astr) {
366366 np . set ( attrs ) ;
367367}
368368
369- function handleRegisteredComponent ( layoutAttributes , _module , astr ) {
370- var np = Lib . nestedProperty ( layoutAttributes , astr ) ,
371- attrs = extendDeep ( np . get ( ) || { } , _module . layoutAttributes ) ;
369+ function insertAttrs ( baseAttrs , newAttrs , astr ) {
370+ var np = Lib . nestedProperty ( baseAttrs , astr ) ;
372371
373- np . set ( attrs ) ;
372+ np . set ( extendDeep ( np . get ( ) || { } , newAttrs ) ) ;
374373}
0 commit comments