Skip to content

Commit efc9faf

Browse files
committed
rm now obsolete 'clean axis layer' code in Plots.linkSubplots
- this should never have been part of Plots.supplyDefaults pipeline.
1 parent 66c75db commit efc9faf

File tree

1 file changed

+6
-14
lines changed

1 file changed

+6
-14
lines changed

src/plots/plots.js

+6-14
Original file line numberDiff line numberDiff line change
@@ -757,6 +757,8 @@ plots.cleanPlot = function(newFullData, newFullLayout, oldFullData, oldFullLayou
757757
};
758758

759759
plots.linkSubplots = function(newFullData, newFullLayout, oldFullData, oldFullLayout) {
760+
var i, j;
761+
760762
var oldSubplots = oldFullLayout._plots || {};
761763
var newSubplots = newFullLayout._plots = {};
762764
var newSubplotList = newFullLayout._subplots;
@@ -768,32 +770,22 @@ plots.linkSubplots = function(newFullData, newFullLayout, oldFullData, oldFullLa
768770

769771
var ids = newSubplotList.cartesian.concat(newSubplotList.gl2d || []);
770772

771-
var i, j, id, ax;
772-
773773
for(i = 0; i < ids.length; i++) {
774-
id = ids[i];
774+
var id = ids[i];
775775
var oldSubplot = oldSubplots[id];
776776
var xaxis = axisIDs.getFromId(mockGd, id, 'x');
777777
var yaxis = axisIDs.getFromId(mockGd, id, 'y');
778778
var plotinfo;
779779

780+
// link or create subplot object
780781
if(oldSubplot) {
781782
plotinfo = newSubplots[id] = oldSubplot;
782-
783-
if(plotinfo.xaxis.layer !== xaxis.layer) {
784-
plotinfo.xlines.attr('d', null);
785-
plotinfo.xaxislayer.selectAll('*').remove();
786-
}
787-
788-
if(plotinfo.yaxis.layer !== yaxis.layer) {
789-
plotinfo.ylines.attr('d', null);
790-
plotinfo.yaxislayer.selectAll('*').remove();
791-
}
792783
} else {
793784
plotinfo = newSubplots[id] = {};
794785
plotinfo.id = id;
795786
}
796787

788+
// update x and y axis layout object refs
797789
plotinfo.xaxis = xaxis;
798790
plotinfo.yaxis = yaxis;
799791

@@ -821,7 +813,7 @@ plots.linkSubplots = function(newFullData, newFullLayout, oldFullData, oldFullLa
821813
// anchored axes to the axes they're anchored to
822814
var axList = axisIDs.list(mockGd, null, true);
823815
for(i = 0; i < axList.length; i++) {
824-
ax = axList[i];
816+
var ax = axList[i];
825817
var mainAx = null;
826818

827819
if(ax.overlaying) {

0 commit comments

Comments
 (0)