summaryrefslogtreecommitdiff
path: root/src/model/diff.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/model/diff.js')
-rw-r--r--src/model/diff.js17
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;
}