Skip to content

Commit 999f877

Browse files
committed
revert guiEdit and fixup autorange interactions for inside tick labels
1 parent 0e52adb commit 999f877

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

src/plot_api/plot_api.js

+1-3
Original file line numberDiff line numberDiff line change
@@ -407,8 +407,8 @@ function insideTickLabelsAutorange(gd) {
407407
var obj = gd._fullLayout._insideTickLabelsAutorange;
408408
if(!obj) return;
409409

410+
relayout(gd, obj);
410411
gd._fullLayout._insideTickLabelsAutorangeDone = true;
411-
return relayout(gd, obj);
412412
}
413413

414414
function emitAfterPlot(gd) {
@@ -2448,8 +2448,6 @@ function update(gd, traceUpdate, layoutUpdate, _traces) {
24482448
*/
24492449
function guiEdit(func) {
24502450
return function wrappedEdit(gd) {
2451-
gd._fullLayout._insideTickLabelsAutorangeDone = false;
2452-
24532451
gd._fullLayout._guiEditing = true;
24542452
var p = func.apply(null, arguments);
24552453
gd._fullLayout._guiEditing = false;

src/plot_api/subroutines.js

+8
Original file line numberDiff line numberDiff line change
@@ -674,6 +674,14 @@ exports.doAutoRangeAndConstraints = function(gd) {
674674

675675
for(var i = 0; i < axList.length; i++) {
676676
ax = axList[i];
677+
678+
if(
679+
gd._fullLayout._insideTickLabelsAutorangeDone &&
680+
((ax._anchorAxis || {}).ticklabelposition || '').indexOf('inside') !== -1
681+
) {
682+
continue;
683+
}
684+
677685
if(!autoRangeDone[ax._id]) {
678686
autoRangeDone[ax._id] = 1;
679687
cleanAxisConstraints(gd, ax);

0 commit comments

Comments
 (0)