Allow a node to declare what settings should be made available to the editor. (#1185)

* Implement register/exportNodeSettings.

* Change normaliseRegisterTypeName to normaliseNodeTypeName. Force it to name in a camel case.
This commit is contained in:
Kazuki-Nakanishi
2017-03-08 14:38:33 +00:00
committed by Nick O'Leary
parent fca77a868f
commit 34089aec70
6 changed files with 156 additions and 23 deletions

View File

@@ -493,6 +493,7 @@ function enableNodeSet(typeOrId) {
delete config.err;
config.enabled = true;
nodeConfigCache = null;
settings.enableNodeSettings(config.types);
return saveNodeList().then(function() {
return filterNodeInfo(config);
});
@@ -515,6 +516,7 @@ function disableNodeSet(typeOrId) {
// TODO: persist setting
config.enabled = false;
nodeConfigCache = null;
settings.disableNodeSettings(config.types);
return saveNodeList().then(function() {
return filterNodeInfo(config);
});