Skip to content

Commit c6aa0fb

Browse files
committed
register: add support for component modules
1 parent 710f312 commit c6aa0fb

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

src/plot_api/register.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ module.exports = function register(_modules) {
3636
registerTransformModule(newModule);
3737
break;
3838

39+
case 'component':
40+
registerComponentModule(newModule);
41+
break;
42+
3943
default:
4044
throw new Error('Invalid module was attempted to be registered!');
4145
}
@@ -69,3 +73,7 @@ function registerTransformModule(newModule) {
6973

7074
Registry.transformsRegistry[newModule.name] = newModule;
7175
}
76+
77+
function registerComponentModule(newModule) {
78+
Registry.componentsRegistry[newModule.name] = newModule;
79+
}

src/registry.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ exports.allTypes = [];
1717
exports.allCategories = {};
1818
exports.subplotsRegistry = {};
1919
exports.transformsRegistry = {};
20+
exports.componentsRegistry = {};
2021

2122
/**
2223
* register a module as the handler for a trace type

0 commit comments

Comments
 (0)