@@ -658,17 +658,29 @@ plots.supplyLayoutGlobalDefaults = function(layoutIn, layoutOut) {
658658plots . supplyLayoutModuleDefaults = function ( layoutIn , layoutOut , fullData ) {
659659 var moduleLayoutDefaults = [
660660 'Axes' , 'Annotations' , 'Shapes' , 'Fx' ,
661- 'Bar' , 'Box' , 'Gl3dLayout' , 'GeoLayout' , ' Pie', 'Legend'
661+ 'Bar' , 'Box' , 'Pie' , 'Legend'
662662 ] ;
663663
664- var i , module ;
664+ var i , _module ;
665665
666666 // don't add a check for 'function in module' as it is better to error out and
667667 // secure the module API then not apply the default function.
668668 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 ) ;
672684 }
673685 }
674686} ;
0 commit comments