Skip to content

Commit d639a93

Browse files
committed
Change module to _module
1 parent b716568 commit d639a93

File tree

2 files changed

+16
-16
lines changed

2 files changed

+16
-16
lines changed

src/plot_api/plot_api.js

+7-7
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ Plotly.plot = function(gd, data, layout, config) {
253253
modules = gd._modules;
254254

255255
var i, j, cd, trace, uid, subplot, subplotInfo,
256-
cdSubplot, cdError, cdModule, module;
256+
cdSubplot, cdError, cdModule, _module;
257257

258258
function getCdSubplot(calcdata, subplot) {
259259
var cdSubplot = [];
@@ -266,13 +266,13 @@ Plotly.plot = function(gd, data, layout, config) {
266266
return cdSubplot;
267267
}
268268

269-
function getCdModule(cdSubplot, module) {
269+
function getCdModule(cdSubplot, _module) {
270270
var cdModule = [];
271271
var i, cd, trace;
272272
for (i = 0; i < cdSubplot.length; i++) {
273273
cd = cdSubplot[i];
274274
trace = cd[0].trace;
275-
if (trace._module===module && trace.visible===true) cdModule.push(cd);
275+
if (trace._module === _module && trace.visible === true) cdModule.push(cd);
276276
}
277277
return cdModule;
278278
}
@@ -311,12 +311,12 @@ Plotly.plot = function(gd, data, layout, config) {
311311
if(subplotInfo.plot) subplotInfo.plot.selectAll('g.trace').remove();
312312

313313
for(j = 0; j < modules.length; j++) {
314-
module = modules[j];
315-
if(!module.plot) continue;
314+
_module = modules[j];
315+
if(!_module.plot) continue;
316316

317317
// plot all traces of this type on this subplot at once
318-
cdModule = getCdModule(cdSubplot, module);
319-
module.plot(gd, subplotInfo, cdModule);
318+
cdModule = getCdModule(cdSubplot, _module);
319+
_module.plot(gd, subplotInfo, cdModule);
320320
Lib.markTime('done ' + (cdModule[0] && cdModule[0][0].trace.type));
321321

322322
// collect the traces that may have error bars

src/plots/plots.js

+9-9
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,7 @@ plots.supplyDefaults = function(gd) {
416416
newData = gd.data || [],
417417
modules = gd._modules = [];
418418

419-
var i, trace, fullTrace, module, axList, ax;
419+
var i, trace, fullTrace, _module, axList, ax;
420420

421421

422422
// first fill in what we can of layout without looking at data
@@ -441,14 +441,14 @@ plots.supplyDefaults = function(gd) {
441441
else if(plots.traceIs(fullTrace, 'gl2d')) newFullLayout._hasGL2D = true;
442442
else if('r' in fullTrace) newFullLayout._hasPolar = true;
443443

444-
module = fullTrace._module;
445-
if (module && modules.indexOf(module)===-1) modules.push(module);
444+
_module = fullTrace._module;
445+
if (_module && modules.indexOf(_module)===-1) modules.push(_module);
446446
}
447447

448448
// special cases that introduce interactions between traces
449449
for (i = 0; i < modules.length; i++) {
450-
module = modules[i];
451-
if (module.cleanData) module.cleanData(newFullData);
450+
_module = modules[i];
451+
if (_module.cleanData) _module.cleanData(newFullData);
452452
}
453453

454454
if (oldFullData.length === newData.length) {
@@ -563,7 +563,7 @@ plots.supplyDataDefaults = function(traceIn, i, layout) {
563563
traceOut.index = i;
564564
var visible = coerce('visible'),
565565
scene,
566-
module;
566+
_module;
567567

568568
coerce('type');
569569
coerce('uid');
@@ -577,14 +577,14 @@ plots.supplyDataDefaults = function(traceIn, i, layout) {
577577
// module-specific attributes --- note: we need to send a trace into
578578
// the 3D modules to have it removed from the webgl context.
579579
if(visible || scene) {
580-
module = plots.getModule(traceOut);
581-
traceOut._module = module;
580+
_module = plots.getModule(traceOut);
581+
traceOut._module = _module;
582582
}
583583

584584
// gets overwritten in pie and geo
585585
if(visible) coerce('hoverinfo', (layout._dataLength === 1) ? 'x+y+z+text' : undefined);
586586

587-
if(module && visible) module.supplyDefaults(traceIn, traceOut, defaultColor, layout);
587+
if(_module && visible) _module.supplyDefaults(traceIn, traceOut, defaultColor, layout);
588588

589589
if(visible) {
590590
coerce('name', 'trace ' + i);

0 commit comments

Comments
 (0)