Skip to content

Commit 88f552a

Browse files
committed
mv gd._modules -> fullLayout._modules
1 parent 1f406e5 commit 88f552a

File tree

5 files changed

+16
-14
lines changed

5 files changed

+16
-14
lines changed

src/plot_api/plot_api.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ Plotly.plot = function(gd, data, layout, config) {
205205
if(!recalc) return;
206206

207207
var subplots = Plots.getSubplotIds(fullLayout, 'cartesian'),
208-
modules = gd._modules;
208+
modules = fullLayout._modules;
209209

210210
// position and range calculations for traces that
211211
// depend on each other ie bars (stacked or grouped)

src/plots/cartesian/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ exports.plot = function(gd) {
3030
var fullLayout = gd._fullLayout,
3131
subplots = Plots.getSubplotIds(fullLayout, 'cartesian'),
3232
calcdata = gd.calcdata,
33-
modules = gd._modules;
33+
modules = fullLayout._modules;
3434

3535
function getCdSubplot(calcdata, subplot) {
3636
var cdSubplot = [];

src/plots/plots.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -447,8 +447,9 @@ plots.supplyDefaults = function(gd) {
447447
oldFullData = gd._fullData || [],
448448
newFullData = gd._fullData = [],
449449
newData = gd.data || [],
450-
modules = gd._modules = [];
450+
newData = gd.data || [];
451451

452+
var modules = newFullLayout._modules = [];
452453
var i, trace, fullTrace, _module, axList, ax;
453454

454455

@@ -792,7 +793,6 @@ plots.purge = function(gd) {
792793

793794
// these get recreated on Plotly.plot anyway, but just to be safe
794795
// (and to have a record of them...)
795-
delete gd._modules;
796796
delete gd._tester;
797797
delete gd._testref;
798798
delete gd._promises;
@@ -810,7 +810,7 @@ plots.purge = function(gd) {
810810
};
811811

812812
plots.style = function(gd) {
813-
var _modules = gd._modules;
813+
var _modules = gd._fullLayout._modules;
814814

815815
for(var i = 0; i < _modules.length; i++) {
816816
var _module = _modules[i];

src/traces/scatterternary/style.js

+11-8
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,16 @@
1212
var scatterStyle = require('../scatter/style');
1313

1414

15-
module.exports = function style(graphDiv) {
16-
for(var i = 0; i < graphDiv._modules.length; i++) {
17-
// we're just going to call scatter style... if we already
18-
// called it, don't need to redo.
19-
// Later though we may want differences, or we may make style
20-
// more specific in its scope, then we can remove this.
21-
if(graphDiv._modules[i].name === 'scatter') return;
15+
module.exports = function style(gd) {
16+
var modules = gd._fullLayout._modules;
17+
18+
// we're just going to call scatter style... if we already
19+
// called it, don't need to redo.
20+
// Later though we may want differences, or we may make style
21+
// more specific in its scope, then we can remove this.
22+
for(var i = 0; i < modules.length; i++) {
23+
if(modules[i].name === 'scatter') return;
2224
}
23-
scatterStyle(graphDiv);
25+
26+
scatterStyle(gd);
2427
};

test/jasmine/tests/plots_test.js

-1
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,6 @@ describe('Test Plots', function() {
351351
expect(gd.undonum).toBeUndefined();
352352
expect(gd.autoplay).toBeUndefined();
353353
expect(gd.changed).toBeUndefined();
354-
expect(gd._modules).toBeUndefined();
355354
expect(gd._tester).toBeUndefined();
356355
expect(gd._testref).toBeUndefined();
357356
expect(gd._promises).toBeUndefined();

0 commit comments

Comments
 (0)