diff options
| author | Alon Levy <alon@pobox.com> | 2014-10-12 23:36:09 +0300 |
|---|---|---|
| committer | Alon Levy <alon@pobox.com> | 2014-10-12 23:36:09 +0300 |
| commit | 0911cf3f355fcd6d96fe6dbe2248ef4ee150e825 (patch) | |
| tree | b7048347d65557064b621d4d135b2e90798c38ca /scripts | |
| parent | c411b972445078cae539b743adda030e53a0a3b4 (diff) | |
myGraph.compareSubset: add verbose logging
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/rhizicore.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/scripts/rhizicore.js b/scripts/rhizicore.js index 4e05c869..74ae2869 100644 --- a/scripts/rhizicore.js +++ b/scripts/rhizicore.js @@ -214,6 +214,9 @@ function myGraph(el) { new_nodes.sort(); new_links.sort(); if (new_nodes.length != state_nodes.length || new_links.length != state_links.length) { + if (verbose) { + console.log('not same size'); + } return {graph_same: false}; } changed_nodes = set_diff(set_from_array(state_nodes.map(function(d) { return d.id; })), @@ -223,6 +226,10 @@ function myGraph(el) { set_old_id = set_from_array(changed_nodes.a_b.map(function (f) { return f.toLowerCase(); })); set_new_id = set_from_array(changed_nodes.b_a.map(function (f) { return f.toLowerCase(); })); } else { + if (verbose) { + console.log('changed too many nodes'); + console.log(changed_nodes); + } return {graph_same: false}; } for (k = 0 ; k < state_links.length ; ++k) { |
