We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9a36cf6 commit 1308cbeCopy full SHA for 1308cbe
src/plots/mapbox/index.js
@@ -68,6 +68,18 @@ exports.plot = function plot(gd) {
68
}
69
};
70
71
+exports.clean = function(newFullData, newFullLayout, oldFullData, oldFullLayout) {
72
+ var oldMapboxKeys = oldFullLayout._subplots[MAPBOX] || [];
73
+
74
+ for(var i = 0; i < oldMapboxKeys.length; i++) {
75
+ var oldMapboxKey = oldMapboxKeys[i];
76
77
+ if(!newFullLayout[oldMapboxKey] && !!oldFullLayout[oldMapboxKey]._subplot) {
78
+ oldFullLayout[oldMapboxKey]._subplot.destroy();
79
+ }
80
81
+};
82
83
exports.toSVG = function(gd) {
84
var fullLayout = gd._fullLayout;
85
var subplotIds = fullLayout._subplots[MAPBOX];
0 commit comments