@@ -658,17 +658,29 @@ plots.supplyLayoutGlobalDefaults = function(layoutIn, layoutOut) {
658
658
plots . supplyLayoutModuleDefaults = function ( layoutIn , layoutOut , fullData ) {
659
659
var moduleLayoutDefaults = [
660
660
'Axes' , 'Annotations' , 'Shapes' , 'Fx' ,
661
- 'Bar' , 'Box' , 'Gl3dLayout' , 'GeoLayout' , ' Pie', 'Legend'
661
+ 'Bar' , 'Box' , 'Pie' , 'Legend'
662
662
] ;
663
663
664
- var i , module ;
664
+ var i , _module ;
665
665
666
666
// don't add a check for 'function in module' as it is better to error out and
667
667
// secure the module API then not apply the default function.
668
668
for ( i = 0 ; i < moduleLayoutDefaults . length ; i ++ ) {
669
- module = moduleLayoutDefaults [ i ] ;
670
- if ( Plotly [ module ] ) {
671
- Plotly [ module ] . supplyLayoutDefaults ( layoutIn , layoutOut , fullData ) ;
669
+ _module = moduleLayoutDefaults [ i ] ;
670
+
671
+ if ( Plotly [ _module ] ) {
672
+ Plotly [ _module ] . supplyLayoutDefaults ( layoutIn , layoutOut , fullData ) ;
673
+ }
674
+ }
675
+
676
+ var plotTypes = Object . keys ( subplotsRegistry ) ;
677
+
678
+ for ( i = 0 ; i < plotTypes . length ; i ++ ) {
679
+ _module = subplotsRegistry [ plotTypes [ i ] ] ;
680
+
681
+ // e.g. gl2d does not have a layout-defaults step
682
+ if ( _module . supplyLayoutDefaults ) {
683
+ _module . supplyLayoutDefaults ( layoutIn , layoutOut , fullData ) ;
672
684
}
673
685
}
674
686
} ;
0 commit comments