diff options
Diffstat (limited to 'src/client')
| -rw-r--r-- | src/client/model/types.js | 8 | ||||
| -rw-r--r-- | src/client/textanalysis.js | 2 |
2 files changed, 4 insertions, 6 deletions
diff --git a/src/client/model/types.js b/src/client/model/types.js index 867969ea..ac10f374 100644 --- a/src/client/model/types.js +++ b/src/client/model/types.js @@ -2,13 +2,11 @@ define(['underscore', 'util', 'model/domain_types'], function(_, util, domain_types) { -var nodetypes, - all_attributes, - type_attributes = domain_types.type_attributes, +var all_attributes, + type_attributes = _.object(domain_types.type_attributes), + nodetypes = _.map(domain_types.type_attributes, 0), attribute_titles = domain_types.attribute_titles; -nodetypes = _.keys(type_attributes); - if (undefined === type_attributes['_defaults']) { type_attributes['_defaults'] = { 'title': 'default', diff --git a/src/client/textanalysis.js b/src/client/textanalysis.js index 0e64fed3..1a98f765 100644 --- a/src/client/textanalysis.js +++ b/src/client/textanalysis.js @@ -12,7 +12,7 @@ var separator_string = rz_config.separator_string; var typeindex = 0, nodetypes = model_types.nodetypes, nodetypes_count = nodetypes.length, - default_nodetype = util.first_contained(nodetypes, ['collaborator', 'person'], nodetypes[0]), + default_nodetype = nodetypes[0], node_name_to_type = {}; util.assert(nodetypes.indexOf(default_nodetype) !== -1); |
