diff options
| author | LV-426 <lv-426@taproot.org.il> | 2014-11-17 13:32:29 +0200 |
|---|---|---|
| committer | Alon Levy <alon@pobox.com> | 2014-11-19 23:21:42 +0200 |
| commit | 3d6d92ecacc3a26bb888541eafc66151a6d2de63 (patch) | |
| tree | c366aa486013ff8c2a66112e133450b9827d0f4f /src/model | |
| parent | a2c1a7b364bc9d1092aaa4af095b495f0da1384f (diff) | |
new_topo_diff() default constructor - add node_set_add, link_set_add arrays
Diffstat (limited to 'src/model')
| -rw-r--r-- | src/model/diff.js | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/src/model/diff.js b/src/model/diff.js index ca9c41c9..5ac48e5a 100644 --- a/src/model/diff.js +++ b/src/model/diff.js @@ -108,7 +108,10 @@ define([], /** * Visual diff object expressing any visual change to the state of a - * particular visualization type + * particular visualization type. + * + * @obj_spec if none is passed a default topo_diff is constructed + * with node,link add sets */ function Vis_Diff(obj_spec) { } @@ -117,8 +120,16 @@ define([], /* * validate obj_spec */ - // TODO - var ret = new Topo_Diff(obj_spec); + var ret; + if (undefined == obj_spec) { + obj_spec = { + node_set_add : [], + link_set_add : [], + } + ret = new Topo_Diff(obj_spec); + } else { + ret = new Topo_Diff(obj_spec); + } return ret; } |
