cartodb-4.42/lib/assets/javascripts/deep-insights/widgets/auto-style/factory.js
2024-04-06 05:25:13 +00:00

16 lines
385 B
JavaScript

var Stylers = {
category: require('./category'),
histogram: require('./histogram')
};
module.exports = {
get: function (dataviewModel, layerModel, style) {
var AutoStyler = Stylers[dataviewModel.get('type')];
if (AutoStyler) {
return new AutoStyler(dataviewModel, layerModel, style);
} else {
throw new Error('dataview type not supported');
}
}
};