Skip to content

Commit 95751cb

Browse files
committed
reset autorange flag for inside tick labels during GUI edits
1 parent 22e9519 commit 95751cb

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/components/modebar/buttons.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ function handleCartesian(gd, ev) {
250250
var val = button.getAttribute('data-val') || true;
251251
var fullLayout = gd._fullLayout;
252252
if(val === 'auto') {
253-
fullLayout._insideTickLabelsAutorangeDone = undefined;
253+
fullLayout._insideTickLabelsAutorangeDone = false;
254254
}
255255

256256
var aobj = {};

src/plot_api/plot_api.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -404,11 +404,10 @@ function plot(gd, data, layout, config) {
404404
}
405405

406406
function insideTickLabelsAutorange(gd) {
407+
gd._fullLayout._insideTickLabelsAutorangeDone = true;
408+
407409
var obj = gd._fullLayout._insideTickLabelsAutorange;
408410
if(!obj) return;
409-
410-
411-
gd._fullLayout._insideTickLabelsAutorangeDone = true;
412411
return relayout(gd, obj);
413412
}
414413

@@ -2451,6 +2450,8 @@ function update(gd, traceUpdate, layoutUpdate, _traces) {
24512450
*/
24522451
function guiEdit(func) {
24532452
return function wrappedEdit(gd) {
2453+
gd._fullLayout._insideTickLabelsAutorangeDone = false;
2454+
24542455
gd._fullLayout._guiEditing = true;
24552456
var p = func.apply(null, arguments);
24562457
gd._fullLayout._guiEditing = false;

0 commit comments

Comments
 (0)