Skip to content

Commit 4a3f254

Browse files
committed
rm some unnecessary deps on Plots
1 parent 11f475e commit 4a3f254

File tree

4 files changed

+7
-8
lines changed

4 files changed

+7
-8
lines changed

src/components/legend/defaults.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ var Lib = require('../../lib');
1313
var Plots = require('../../plots/plots');
1414

1515
var attributes = require('./attributes');
16+
var basePlotLayoutAttributes = require('../../plots/layout_attributes');
1617
var helpers = require('./helpers');
1718

1819

@@ -53,7 +54,7 @@ module.exports = function legendDefaults(layoutIn, layoutOut, fullData) {
5354
}
5455

5556
var showLegend = Lib.coerce(layoutIn, layoutOut,
56-
Plots.layoutAttributes, 'showlegend', visibleTraces > 1);
57+
basePlotLayoutAttributes, 'showlegend', visibleTraces > 1);
5758

5859
if(showLegend === false) return;
5960

src/plots/cartesian/layout_defaults.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
var Lib = require('../../lib');
1313
var Plots = require('../plots');
1414
var Color = require('../../components/color');
15+
var basePlotLayoutAttributes = require('../layout_attributes');
1516

1617
var RangeSlider = require('../../components/rangeslider');
1718
var RangeSelector = require('../../components/rangeselector');
@@ -112,7 +113,7 @@ module.exports = function supplyLayoutDefaults(layoutIn, layoutOut, fullData) {
112113
// TODO: bgcolor for each subplot, to inherit from the main one
113114
var plot_bgcolor = Color.background;
114115
if(xaList.length && yaList.length) {
115-
plot_bgcolor = Lib.coerce(layoutIn, layoutOut, Plots.layoutAttributes, 'plot_bgcolor');
116+
plot_bgcolor = Lib.coerce(layoutIn, layoutOut, basePlotLayoutAttributes, 'plot_bgcolor');
116117
}
117118

118119
var bgColor = Color.combine(plot_bgcolor, layoutOut.paper_bgcolor);

src/plots/gl3d/scene.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ var createPlot = require('gl-plot3d');
1313

1414
var Lib = require('../../lib');
1515

16-
var Plots = require('../../plots/plots');
1716
var Axes = require('../../plots/cartesian/axes');
1817
var Fx = require('../../plots/cartesian/graph_interact');
1918

@@ -399,8 +398,7 @@ proto.plot = function(sceneData, fullLayout, layout) {
399398
if(trace) {
400399
trace.update(data);
401400
} else {
402-
var traceModule = Plots.getModule(data.type);
403-
trace = traceModule.plot(this, data);
401+
trace = data._module.plot(this, data);
404402
this.traces[data.uid] = trace;
405403
}
406404
trace.name = data.name;

src/plots/layout_attributes.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,11 @@
88

99
'use strict';
1010

11-
var fontAttrs = require('./font_attributes');
12-
var colorAttrs = require('../components/color/attributes');
13-
1411
var Lib = require('../lib');
1512
var extendFlat = Lib.extendFlat;
1613

14+
var fontAttrs = require('./font_attributes');
15+
var colorAttrs = require('../components/color/attributes');
1716

1817
module.exports = {
1918
font: {

0 commit comments

Comments
 (0)