Skip to content

Commit

Permalink
add some logging
Browse files Browse the repository at this point in the history
  • Loading branch information
etpinard committed Aug 6, 2019
1 parent b1f549f commit 1c09a52
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/plots/plots.js
Original file line number Diff line number Diff line change
Expand Up @@ -1935,7 +1935,12 @@ plots.doAutoMargin = function(gd) {
} else {
fullLayout._redrawFromAutoMarginCount = 1;
}
return Registry.call('plot', gd);

if(fullLayout._redrawFromAutoMarginCount < 10) {
return Registry.call('plot', gd);
} else {
console.log('off limit', fullLayout._redrawFromAutoMarginCount)
}
}
};

Expand All @@ -1949,6 +1954,7 @@ plots.didMarginChange = function(margin0, margin1) {
// use 1px tolerance in case we old/new differ only
// by rounding errors, which can lead to infinite loops
if(!isNumeric(m0) || Math.abs(m1 - m0) > 1) {
console.log('margin changed by', Math.abs(m1 - m0))
return true;
}
}
Expand Down

0 comments on commit 1c09a52

Please sign in to comment.