Skip to content

Commit

Permalink
use (xl,xr,yt,yb) instead of (x,y) as push margin coordinates
Browse files Browse the repository at this point in the history
... this enables an axis to push the margin on
    both side of its span
  • Loading branch information
etpinard committed Sep 24, 2019
1 parent a9e2dbb commit f506306
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/plots/cartesian/axes.js
Original file line number Diff line number Diff line change
Expand Up @@ -1897,12 +1897,12 @@ axes.drawOne = function(gd, ax, opts) {
if(llbbox.width > 0) {
var rExtra = llbbox.right - (ax._offset + ax._length);
if(rExtra > 0) {
push.x = 1;
push.xr = 1;
push.r = rExtra;
}
var lExtra = ax._offset - llbbox.left;
if(lExtra > 0) {
push.x = 0;
push.xl = 0;
push.l = lExtra;
}
}
Expand All @@ -1917,12 +1917,12 @@ axes.drawOne = function(gd, ax, opts) {
if(llbbox.height > 0) {
var bExtra = llbbox.bottom - (ax._offset + ax._length);
if(bExtra > 0) {
push.y = 0;
push.yb = 0;
push.b = bExtra;
}
var tExtra = ax._offset - llbbox.top;
if(tExtra > 0) {
push.y = 1;
push.yt = 1;
push.t = tExtra;
}
}
Expand Down

0 comments on commit f506306

Please sign in to comment.