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 0b120f9 commit 84fb9faCopy full SHA for 84fb9fa
src/plots/gl2d/index.js
@@ -65,3 +65,17 @@ exports.plot = function plotGl2d(gd) {
65
scene.plot(fullSubplotData, fullLayout, gd.layout);
66
}
67
};
68
+
69
+exports.clean = function(newFullData, newFullLayout, oldFullData, oldFullLayout) {
70
+ var oldSceneKeys = Plots.getSubplotIds(oldFullLayout, 'gl2d');
71
72
+ for(var i = 0; i < oldSceneKeys.length; i++) {
73
+ var oldSubplot = oldFullLayout._plots[oldSceneKeys[i]],
74
+ xaName = oldSubplot.xaxis._name,
75
+ yaName = oldSubplot.yaxis._name;
76
77
+ if(!!oldSubplot._scene2d && (!newFullLayout[xaName] || !newFullLayout[yaName])) {
78
+ oldSubplot._scene2d.destroy();
79
+ }
80
81
+};
0 commit comments