Skip to content

Commit 179dd5b

Browse files
Sync overlayed axis relayout
1 parent 3a87dd4 commit 179dd5b

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

src/plots/cartesian/dragbox.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -726,16 +726,24 @@ function makeDragBox(gd, plotinfo, x, y, w, h, ns, ew) {
726726
if(!axList[i].fixedrange) activeAxIds.push(axList[i]._id);
727727
}
728728
}
729+
730+
function pushActiveAxIdsSynced(axList, axisType) {
731+
for(i = 0; i < axList.length; i++) {
732+
if(!axList[i].fixedrange && axList[i][axisType]) {activeAxIds.push(axList[i][axisType]._id);}
733+
}
734+
}
729735

730736
if(editX) {
731737
pushActiveAxIds(xaxes);
732738
pushActiveAxIds(links.xaxes);
733739
pushActiveAxIds(matches.xaxes);
740+
pushActiveAxIdsSynced(plotinfo.overlays, 'xaxis');
734741
}
735742
if(editY) {
736743
pushActiveAxIds(yaxes);
737744
pushActiveAxIds(links.yaxes);
738745
pushActiveAxIds(matches.yaxes);
746+
pushActiveAxIdsSynced(plotinfo.overlays, 'yaxis');
739747
}
740748

741749
updates = {};

test/image/mocks/z-new_tickmode_sync.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,6 @@
4444
},
4545
"width": 700,
4646
"showlegend": false,
47-
"xaxis": {
48-
"autorange": "true"
49-
},
5047
"xaxis2": {
5148
"anchor": "y2",
5249
"side": "top",
@@ -87,4 +84,4 @@
8784
"zeroline": false
8885
}
8986
}
90-
}
87+
}

0 commit comments

Comments
 (0)