@@ -266,12 +266,12 @@ Plotly.plot = function(gd, data, layout, config) {
266
266
// clean up old scenes that no longer have associated data
267
267
// will this be a performance hit?
268
268
269
- var registry = plots . subplotsRegistry ;
269
+ var plotRegistry = plots . subplotsRegistry ;
270
270
271
271
// 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 ) ;
275
275
276
276
// in case of traces that were heatmaps or contour maps
277
277
// previously, remove them and their colorbars explicitly
@@ -765,9 +765,8 @@ function cleanData(data, existingData) {
765
765
if ( trace . yaxis ) trace . yaxis = Plotly . Axes . cleanId ( trace . yaxis , 'y' ) ;
766
766
767
767
// 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 ) ;
771
770
}
772
771
773
772
if ( ! plots . traceIs ( trace , 'pie' ) ) {
@@ -2494,10 +2493,7 @@ function makePlotFramework(gd) {
2494
2493
fullLayout = gd . _fullLayout ;
2495
2494
2496
2495
// 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 ) ;
2501
2497
2502
2498
// Plot container
2503
2499
fullLayout . _container = gd3 . selectAll ( '.plot-container' ) . data ( [ 0 ] ) ;
0 commit comments