Skip to content

Commit b1945de

Browse files
committed
rename axis utils module --> axis_ids
1 parent a5be33a commit b1945de

File tree

5 files changed

+16
-16
lines changed

5 files changed

+16
-16
lines changed

src/plots/cartesian/axes.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ axes.supplyLayoutDefaults = require('./layout_defaults');
2020

2121
axes.setConvert = require('./set_convert');
2222

23-
var utils = require('./utils');
24-
axes.id2name = utils.id2name;
25-
axes.cleanId = utils.cleanId;
26-
axes.list = utils.list;
27-
axes.listIds = utils.listIds;
28-
axes.getFromId = utils.getFromId;
29-
axes.getFromTrace = utils.getFromTrace;
23+
var axisIds = require('./axisIds');
24+
axes.id2name = axisIds.id2name;
25+
axes.cleanId = axisIds.cleanId;
26+
axes.list = axisIds.list;
27+
axes.listIds = axisIds.listIds;
28+
axes.getFromId = axisIds.getFromId;
29+
axes.getFromTrace = axisIds.getFromTrace;
3030

3131

3232
// find the list of possible axes to reference with an xref or yref attribute

src/plots/cartesian/axis_defaults.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ var handleTickValueDefaults = require('./tick_value_defaults');
1919
var handleTickDefaults = require('./tick_defaults');
2020
var setConvert = require('./set_convert');
2121
var cleanDatum = require('./clean_datum');
22-
var utils = require('./utils');
22+
var axisIds = require('./axis_ids');
2323

2424

2525
/**
@@ -44,7 +44,7 @@ module.exports = function handleAxisDefaults(containerIn, containerOut, coerce,
4444
// set up some private properties
4545
if(options.name) {
4646
containerOut._name = options.name;
47-
containerOut._id = utils.name2id(options.name);
47+
containerOut._id = axisIds.name2id(options.name);
4848
}
4949

5050
// now figure out type and do some more initialization
File renamed without changes.

src/plots/cartesian/layout_defaults.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ var constants = require('./constants');
1616
var layoutAttributes = require('./layout_attributes');
1717
var handleAxisDefaults = require('./axis_defaults');
1818
var handlePositionDefaults = require('./position_defaults');
19-
var utils = require('./utils');
19+
var axisIds = require('./axis_ids');
2020

2121

2222
module.exports = function supplyLayoutDefaults(layoutIn, layoutOut, fullData) {
@@ -36,8 +36,8 @@ module.exports = function supplyLayoutDefaults(layoutIn, layoutOut, fullData) {
3636

3737
for(i = 0; i < fullData.length; i++) {
3838
var trace = fullData[i],
39-
xaName = utils.id2name(trace.xaxis),
40-
yaName = utils.id2name(trace.yaxis);
39+
xaName = axisIds.id2name(trace.xaxis),
40+
yaName = axisIds.id2name(trace.yaxis);
4141

4242
// add axes implied by traces
4343
if(xaName && xaList.indexOf(xaName) === -1) xaList.push(xaName);
@@ -84,10 +84,10 @@ module.exports = function supplyLayoutDefaults(layoutIn, layoutOut, fullData) {
8484
},
8585
positioningOptions = {
8686
letter: axLetter,
87-
counterAxes: {x: yaList, y: xaList}[axLetter].map(utils.name2id),
87+
counterAxes: {x: yaList, y: xaList}[axLetter].map(axisIds.name2id),
8888
overlayableAxes: {x: xaList, y: yaList}[axLetter].filter(function(axName2){
8989
return axName2!==axName && !(layoutIn[axName2]||{}).overlaying;
90-
}).map(utils.name2id)
90+
}).map(axisIds.name2id)
9191
};
9292

9393
function coerce(attr, dflt) {

src/plots/cartesian/set_convert.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ var Lib = require('../../lib');
1616

1717
var constants = require('./constants');
1818
var cleanDatum = require('./clean_datum');
19-
var utils = require('./utils');
19+
var axisIds = require('./axis_ids');
2020

2121

2222
/**
@@ -74,7 +74,7 @@ module.exports = function setConvert(ax) {
7474
// make sure we have a domain (pull it in from the axis
7575
// this one is overlaying if necessary)
7676
if(ax.overlaying) {
77-
var ax2 = utils.getFromId(ax._td, ax.overlaying);
77+
var ax2 = axisIds.getFromId(ax._td, ax.overlaying);
7878
ax.domain = ax2.domain;
7979
}
8080

0 commit comments

Comments
 (0)