Skip to content

Commit e3f72f0

Browse files
committed
move block of _has?? = _has('') after all defaults are filled:
- so that orphan axes are considered hasCartesian still - IMPORTANT: we must keep ref to _has??? for backward compatibility
1 parent dc297ca commit e3f72f0

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

src/plots/plots.js

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -488,13 +488,6 @@ plots.supplyDefaults = function(gd) {
488488

489489
// attach helper method to check whether a plot type is present on graph
490490
newFullLayout._has = plots._hasPlotType.bind(newFullLayout);
491-
// temporary block (before replace all _has??? with _hasPlotType() ?
492-
newFullLayout._hasCartesian = newFullLayout._has('cartesian');
493-
newFullLayout._hasGeo = newFullLayout._has('geo');
494-
newFullLayout._hasGL3D = newFullLayout._has('gl3d');
495-
newFullLayout._hasGL2D = newFullLayout._has('gl2d');
496-
newFullLayout._hasTernary = newFullLayout._has('ternary');
497-
newFullLayout._hasPie = newFullLayout._has('pie');
498491

499492
// special cases that introduce interactions between traces
500493
for(i = 0; i < modules.length; i++) {
@@ -511,6 +504,15 @@ plots.supplyDefaults = function(gd) {
511504
// finally, fill in the pieces of layout that may need to look at data
512505
plots.supplyLayoutModuleDefaults(newLayout, newFullLayout, newFullData);
513506

507+
// TODO remove in v2.0.0
508+
// add has-plot-type refs to fullLayout for backward compatibility
509+
newFullLayout._hasCartesian = newFullLayout._has('cartesian');
510+
newFullLayout._hasGeo = newFullLayout._has('geo');
511+
newFullLayout._hasGL3D = newFullLayout._has('gl3d');
512+
newFullLayout._hasGL2D = newFullLayout._has('gl2d');
513+
newFullLayout._hasTernary = newFullLayout._has('ternary');
514+
newFullLayout._hasPie = newFullLayout._has('pie');
515+
514516
// clean subplots and other artifacts from previous plot calls
515517
plots.cleanPlot(newFullData, newFullLayout, oldFullData, oldFullLayout);
516518

0 commit comments

Comments
 (0)