Skip to content

Commit 1e6862a

Browse files
committed
Lib.log when margin push are dropped
1 parent c33c92f commit 1e6862a

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/plots/plots.js

+8-2
Original file line numberDiff line numberDiff line change
@@ -1820,8 +1820,14 @@ plots.autoMargin = function(gd, id, o) {
18201820

18211821
// if the item is too big, just give it enough automargin to
18221822
// make sure you can still grab it and bring it back
1823-
if(o.l + o.r > fullLayout.width * 0.5) o.l = o.r = 0;
1824-
if(o.b + o.t > fullLayout.height * 0.5) o.b = o.t = 0;
1823+
if(o.l + o.r > fullLayout.width * 0.5) {
1824+
Lib.log('Margin push', id, 'is too big in x, dropping');
1825+
o.l = o.r = 0;
1826+
}
1827+
if(o.b + o.t > fullLayout.height * 0.5) {
1828+
Lib.log('Margin push', id, 'is too big in y, dropping');
1829+
o.b = o.t = 0;
1830+
}
18251831

18261832
var xl = o.xl !== undefined ? o.xl : o.x;
18271833
var xr = o.xr !== undefined ? o.xr : o.x;

0 commit comments

Comments
 (0)