Skip to content

Commit f62f186

Browse files
committed
rename to pad inside functions
1 parent c5b79ea commit f62f186

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/plots/cartesian/autorange.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -237,13 +237,13 @@ function makePadFn(ax, max) {
237237

238238
var TEXTPAD = 3;
239239

240-
function adjustPadForInsideLabelsOnThisAxis(extrappad, ax, max) {
240+
function adjustPadForInsideLabelsOnThisAxis(pad, ax, max) {
241241
var ticklabelposition = ax.ticklabelposition || '';
242242
var has = function(str) {
243243
return ticklabelposition.indexOf(str) !== -1;
244244
};
245245

246-
if(!has('inside')) return extrappad;
246+
if(!has('inside')) return pad;
247247
var isTop = has('top');
248248
var isLeft = has('left');
249249
var isRight = has('right');
@@ -254,7 +254,7 @@ function adjustPadForInsideLabelsOnThisAxis(extrappad, ax, max) {
254254
(max && (isLeft || isBottom)) ||
255255
(!max && (isRight || isTop))
256256
) {
257-
return extrappad;
257+
return pad;
258258
}
259259

260260
// increase padding to make more room for inside tick labels of the axis
@@ -269,12 +269,12 @@ function adjustPadForInsideLabelsOnThisAxis(extrappad, ax, max) {
269269

270270
morePad += TEXTPAD;
271271

272-
extrappad = Math.max(extrappad, morePad);
272+
pad = Math.max(pad, morePad);
273273

274-
return extrappad;
274+
return pad;
275275
}
276276

277-
function adjustPadForInsideLabelsOnAnchorAxis(extrappad, ax, max) {
277+
function adjustPadForInsideLabelsOnAnchorAxis(pad, ax, max) {
278278
var anchorAxis = (ax._anchorAxis || {});
279279
if((anchorAxis.ticklabelposition || '').indexOf('inside') !== -1) {
280280
// increase padding to make more room for inside tick labels of the counter axis
@@ -318,11 +318,11 @@ function adjustPadForInsideLabelsOnAnchorAxis(extrappad, ax, max) {
318318
morePad += anchorAxis.ticklen || 0;
319319
}
320320

321-
extrappad = Math.max(extrappad, morePad);
321+
pad = Math.max(pad, morePad);
322322
}
323323
}
324324

325-
return extrappad;
325+
return pad;
326326
}
327327

328328
function concatExtremes(gd, ax, noMatch) {

0 commit comments

Comments
 (0)