Skip to content

Commit 599de22

Browse files
committed
declare uniform functions on top of bar plot
1 parent ba1ae6f commit 599de22

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/traces/bar/plot.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ var Registry = require('../../registry');
2020
var tickText = require('../../plots/cartesian/axes').tickText;
2121

2222
var uniformText = require('./uniform_text');
23+
var recordMinTextSize = uniformText.recordMinTextSize;
24+
var clearMinTextSize = uniformText.clearMinTextSize;
25+
2326
var style = require('./style');
2427
var helpers = require('./helpers');
2528
var constants = require('./constants');
@@ -94,7 +97,7 @@ function plot(gd, plotinfo, cdModule, traceLayer, opts, makeOnCompleteCallback)
9497
};
9598

9699
// don't clear bar when this is called from waterfall or funnel
97-
uniformText.clearMinTextSize('bar', fullLayout);
100+
clearMinTextSize('bar', fullLayout);
98101
}
99102

100103
var bartraces = Lib.makeTraceGroups(traceLayer, cdModule, 'trace bars').each(function(cd) {
@@ -410,7 +413,7 @@ function appendBarText(gd, plotinfo, bar, cd, i, x0, x1, y0, y1, opts, makeOnCom
410413
}
411414

412415
transform.fontSize = font.size;
413-
uniformText.recordMinTextSize(trace.type, transform, fullLayout);
416+
recordMinTextSize(trace.type, transform, fullLayout);
414417
calcBar.transform = transform;
415418

416419
transition(textSelection, fullLayout, opts, makeOnCompleteCallback)

0 commit comments

Comments
 (0)