Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1dcce20

Browse files
committed
rename plot module 'type' field --> 'name'
1 parent 0b07dbd commit 1dcce20

File tree

6 files changed

+6
-6
lines changed

6 files changed

+6
-6
lines changed

src/plots/cartesian/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
var Plotly = require('../../plotly');
1313

1414

15-
exports.type = 'cartesian';
15+
exports.name = 'cartesian';
1616

1717
exports.attr = ['xaxis', 'yaxis'];
1818

src/plots/geo/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ var Geo = require('./geo');
1616
var Plots = Plotly.Plots;
1717

1818

19-
exports.type = 'geo';
19+
exports.name = 'geo';
2020

2121
exports.attr = 'geo';
2222

src/plots/gl2d/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ var Scene2D = require('./scene2d');
1616
var Plots = Plotly.Plots;
1717

1818

19-
exports.type = 'gl2d';
19+
exports.name = 'gl2d';
2020

2121
exports.attr = ['xaxis', 'yaxis'];
2222

src/plots/gl3d/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ var plots = Plotly.Plots;
1717
var axesNames = ['xaxis', 'yaxis', 'zaxis'];
1818

1919

20-
exports.type = 'gl3d';
20+
exports.name = 'gl3d';
2121

2222
exports.attr = 'scene';
2323

src/plots/plots.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ plots.traceIs = function traceIs(traceType, category) {
126126
* TODO use these in Lib.coerce
127127
*/
128128
plots.registerSubplot = function(_module) {
129-
var plotType = _module.type;
129+
var plotType = _module.name;
130130

131131
if(subplotsRegistry[plotType]) {
132132
throw new Error('plot type' + plotType + ' already registered');

test/jasmine/tests/plots_test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ describe('Test Plotly.Plots', function () {
235235

236236
describe('Plotly.Plots.registerSubplot', function() {
237237
var fake = {
238-
type: 'fake',
238+
name: 'fake',
239239
attr: 'abc',
240240
idRoot: 'cba',
241241
attributes: { stuff: { 'more stuff': 102102 } }

0 commit comments

Comments
 (0)