diff options
| author | Alon Levy <alon@pobox.com> | 2015-03-07 08:39:18 +0200 |
|---|---|---|
| committer | Alon Levy <alon@pobox.com> | 2015-03-07 15:02:42 +0200 |
| commit | 2746c5d10ca67fdfd31ead979d0ccd3ee03ebed6 (patch) | |
| tree | 4044b1091d95b6d294ee5741ec6ecaf10993f4bc /src/client/view | |
| parent | 0e51a475db95fe410ca43c03710b75ab389bd6d5 (diff) | |
client: move nodetypes from consts to model/types
Diffstat (limited to 'src/client/view')
| -rw-r--r-- | src/client/view/graph_view.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/client/view/graph_view.js b/src/client/view/graph_view.js index ff7de845..b6372307 100644 --- a/src/client/view/graph_view.js +++ b/src/client/view/graph_view.js @@ -25,8 +25,8 @@ * which resulted in overly complex (read: undefined/buggy) code. */ -define(['d3', 'Bacon_wrapper', 'util', 'view/selection', 'view/helpers', 'model/diff', 'view/view', 'view/bubble'], -function(d3 , Bacon , util , selection , view_helpers, model_diff , view, view_bubble) { +define(['d3', 'Bacon_wrapper', 'util', 'view/selection', 'view/helpers', 'model/diff', 'view/view', 'view/bubble', 'model/types'], +function(d3 , Bacon , util , selection , view_helpers, model_diff , view, view_bubble, model_types) { var obj_take = util.obj_take; @@ -96,8 +96,8 @@ function GraphView(spec) { cx, cy, // FIXME take filter names from index.html or both from graph db - filter_states = {'interest':null, 'skill':null, 'club':null, 'person':null, 'third-internship-proposal':null}, - filter_state_names = ['interest', 'skill', 'club', 'person', 'third-internship-proposal']; + filter_states = _.object(_.map(model_types.nodetypes, function (type) { return [type, null]; })), + filter_state_names = model_types.nodetypes; util.assert(parent_element !== undefined && graph_name !== undefined && graph !== undefined && zoom_property !== undefined && |
