Skip to content

Commit 3bea1c7

Browse files
committed
call plot module plot method base on plot registy in Plotly.plot
1 parent 35470aa commit 3bea1c7

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/plot_api/plot_api.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -266,10 +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-
// ... until subplot of different type play better together
270-
if(gd._fullLayout._hasGL3D) plotGl3d(gd);
271-
if(gd._fullLayout._hasGeo) plotGeo(gd);
272-
if(gd._fullLayout._hasGL2D) plotGl2d(gd);
269+
var registry = plots.subplotsRegistry;
270+
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);
273275

274276
// in case of traces that were heatmaps or contour maps
275277
// previously, remove them and their colorbars explicitly

0 commit comments

Comments
 (0)