Skip to content

Commit

Permalink
revert guiEdit and fixup autorange interactions for inside tick labels
Browse files Browse the repository at this point in the history
  • Loading branch information
archmoj committed Dec 1, 2020
1 parent 0e52adb commit 999f877
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
4 changes: 1 addition & 3 deletions src/plot_api/plot_api.js
Original file line number Diff line number Diff line change
Expand Up @@ -407,8 +407,8 @@ function insideTickLabelsAutorange(gd) {
var obj = gd._fullLayout._insideTickLabelsAutorange;
if(!obj) return;

relayout(gd, obj);
gd._fullLayout._insideTickLabelsAutorangeDone = true;
return relayout(gd, obj);
}

function emitAfterPlot(gd) {
Expand Down Expand Up @@ -2448,8 +2448,6 @@ function update(gd, traceUpdate, layoutUpdate, _traces) {
*/
function guiEdit(func) {
return function wrappedEdit(gd) {
gd._fullLayout._insideTickLabelsAutorangeDone = false;

gd._fullLayout._guiEditing = true;
var p = func.apply(null, arguments);
gd._fullLayout._guiEditing = false;
Expand Down
8 changes: 8 additions & 0 deletions src/plot_api/subroutines.js
Original file line number Diff line number Diff line change
Expand Up @@ -674,6 +674,14 @@ exports.doAutoRangeAndConstraints = function(gd) {

for(var i = 0; i < axList.length; i++) {
ax = axList[i];

if(
gd._fullLayout._insideTickLabelsAutorangeDone &&
((ax._anchorAxis || {}).ticklabelposition || '').indexOf('inside') !== -1
) {
continue;
}

if(!autoRangeDone[ax._id]) {
autoRangeDone[ax._id] = 1;
cleanAxisConstraints(gd, ax);
Expand Down

0 comments on commit 999f877

Please sign in to comment.