@@ -266,12 +266,12 @@ Plotly.plot = function(gd, data, layout, config) {
266266 // clean up old scenes that no longer have associated data
267267 // will this be a performance hit?
268268
269- var registry = plots . subplotsRegistry ;
269+ var plotRegistry = plots . subplotsRegistry ;
270270
271271 // TODO incorporate cartesian and polar plots into this paradigm
272- if ( fullLayout . _hasGL3D && registry . gl3d ) registry . gl3d . plot ( gd ) ;
273- if ( fullLayout . _hasGeo && registry . geo ) registry . geo . plot ( gd ) ;
274- if ( fullLayout . _hasGL2D && registry . gl2d ) registry . gl2d . plot ( gd ) ;
272+ if ( fullLayout . _hasGL3D ) plotRegistry . gl3d . plot ( gd ) ;
273+ if ( fullLayout . _hasGeo ) plotRegistry . geo . plot ( gd ) ;
274+ if ( fullLayout . _hasGL2D ) plotRegistry . gl2d . plot ( gd ) ;
275275
276276 // in case of traces that were heatmaps or contour maps
277277 // previously, remove them and their colorbars explicitly
@@ -765,9 +765,8 @@ function cleanData(data, existingData) {
765765 if ( trace . yaxis ) trace . yaxis = Plotly . Axes . cleanId ( trace . yaxis , 'y' ) ;
766766
767767 // scene ids scene1 -> scene
768- var plotRegistry = plots . subplotsRegistry ;
769- if ( trace . scene && plotRegistry . gl3d ) {
770- trace . scene = plotRegistry . gl3d . cleanId ( trace . scene ) ;
768+ if ( plots . traceIs ( trace , 'gl3d' ) && trace . scene ) {
769+ trace . scene = plots . subplotsRegistry . gl3d . cleanId ( trace . scene ) ;
771770 }
772771
773772 if ( ! plots . traceIs ( trace , 'pie' ) ) {
@@ -2494,10 +2493,7 @@ function makePlotFramework(gd) {
24942493 fullLayout = gd . _fullLayout ;
24952494
24962495 // TODO - find a better place for 3D to initialize axes
2497- var plotRegistry = plots . subplotsRegistry ;
2498- if ( fullLayout . _hasGL3D && plotRegistry . gl3d ) {
2499- plotRegistry . gl3d . initAxes ( gd ) ;
2500- }
2496+ if ( fullLayout . _hasGL3D ) plots . subplotsRegistry . gl3d . initAxes ( gd ) ;
25012497
25022498 // Plot container
25032499 fullLayout . _container = gd3 . selectAll ( '.plot-container' ) . data ( [ 0 ] ) ;
0 commit comments