Skip to content

Commit 5afad5e

Browse files
Remove unused tickmode sync logic
1 parent a08766b commit 5afad5e

File tree

1 file changed

+1
-30
lines changed

1 file changed

+1
-30
lines changed

src/plots/cartesian/axes.js

Lines changed: 1 addition & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -2291,40 +2291,10 @@ axes.draw = function(gd, arg, opts) {
22912291
fullLayout._infolayer.select('.g-' + ya._id + 'title').remove();
22922292
}
22932293
});
2294-
} else if(arg && arg.length === 1) {
2295-
fullLayout._paper.selectAll('g.subplot').each(function(d) {
2296-
var id = d[0];
2297-
var plotinfo = fullLayout._plots[id];
2298-
if(plotinfo) {
2299-
var xa = plotinfo.xaxis;
2300-
var ya = plotinfo.yaxis;
2301-
addSyncAxis(xa, arg[0]);
2302-
addSyncAxis(ya, arg[0]);
2303-
}
2304-
});
2305-
}
2306-
2307-
function addSyncAxis(ax, idToValidate) {
2308-
if(ax.tickmode === 'sync' && ax.overlaying === idToValidate) {
2309-
arg.push(ax._id);
2310-
}
23112294
}
23122295

23132296
var axList = (!arg || arg === 'redraw') ? axes.listIds(gd) : arg;
23142297

2315-
// order axes that have dependency to other axes
2316-
axList.map(function(axId) {
2317-
var ax = axes.getFromId(gd, axId);
2318-
2319-
if(ax.tickmode === 'sync' && ax.overlaying) {
2320-
var overlayingIndex = axList.findIndex(function(axis) {return axis === ax.overlaying;});
2321-
2322-
if(overlayingIndex >= 0) {
2323-
axList.unshift(axList.splice(overlayingIndex, 1).shift());
2324-
}
2325-
}
2326-
});
2327-
23282298
var fullAxList = axes.list(gd);
23292299
// Get the list of the overlaying axis for all 'shift' axes
23302300
var overlayingShiftedAx = fullAxList.filter(function(ax) {
@@ -2333,6 +2303,7 @@ axes.draw = function(gd, arg, opts) {
23332303
return ax.overlaying;
23342304
});
23352305

2306+
23362307
var axShifts = {'false': {'left': 0, 'right': 0}};
23372308

23382309
return Lib.syncOrAsync(axList.map(function(axId) {

0 commit comments

Comments
 (0)