Skip to content

Commit aa8db38

Browse files
committed
Update register function to load base plot modules as well
1 parent f1d4490 commit aa8db38

File tree

1 file changed

+4
-13
lines changed

1 file changed

+4
-13
lines changed

src/plotly.js

+4-13
Original file line numberDiff line numberDiff line change
@@ -36,23 +36,10 @@ exports.defaultConfig = require('./plot_api/plot_config');
3636
// plots
3737
var Plots = exports.Plots = require('./plots/plots');
3838

39-
var Cartesian = require('./plots/cartesian');
40-
Plots.registerSubplot(Cartesian);
41-
42-
var Geo = require('./plots/geo');
43-
Plots.registerSubplot(Geo);
44-
45-
var Gl3d = require('./plots/gl3d');
46-
Plots.registerSubplot(Gl3d);
47-
48-
var Gl2d = require('./plots/gl2d');
49-
Plots.registerSubplot(Gl2d);
50-
5139
exports.Axes = require('./plots/cartesian/axes');
5240
exports.Fx = require('./plots/cartesian/graph_interact');
5341
exports.micropolar = require('./plots/polar/micropolar');
5442

55-
5643
// components
5744
exports.Color = require('./components/color');
5845
exports.Drawing = require('./components/drawing');
@@ -80,6 +67,10 @@ exports.register = function register(_modules) {
8067
throw new Error('Invalid module was attempted to be registered!');
8168
} else {
8269
Plots.register(newModule, newModule.name, newModule.categories, newModule.meta);
70+
71+
if(!Plots.subplotsRegistry[newModule.basePlotModule.name]){
72+
Plots.registerSubplot(newModule.basePlotModule);
73+
}
8374
}
8475
}
8576
};

0 commit comments

Comments
 (0)