diff options
| author | LV-426 <lv-426@taproot.org.il> | 2015-01-13 00:32:31 +0200 |
|---|---|---|
| committer | LV-426 <lv-426@taproot.org.il> | 2015-01-13 00:32:31 +0200 |
| commit | df7393bce9b00dade07a26c15e9406b2e6c7fbc5 (patch) | |
| tree | 3d840df766f11c35ad9a413da86ab3b67218667c /src | |
| parent | 49792b2a09a1f16a30a8d18f5e6453b0319276ff (diff) | |
rz_mesh: ws_diff_merge__attr()
Diffstat (limited to 'src')
| -rw-r--r-- | src/client/rz_mesh.js | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/client/rz_mesh.js b/src/client/rz_mesh.js index 92bbdfea..95a5f9ef 100644 --- a/src/client/rz_mesh.js +++ b/src/client/rz_mesh.js @@ -63,16 +63,19 @@ define([ 'rz_config', 'util', 'model/diff', 'model/util', 'socketio'], function( // not a resolved link object set var topo_diff = model_diff.new_topo_diff(topo_diff_spec); // run through validation - console.log('ws: rx: diff_merge__topo, committing wire-adapted topo_diff:', topo_diff); + console.log('ws: rx: ws_diff_merge__topo, committing wire-adapted topo_diff:', topo_diff); rz_mesh_graph_ref.commit_diff__topo(topo_diff_spec); } - function diff_merge__attr(attr_diff_raw) { + /** + * Handle websocket incoming Attr_Diffs + * + * @param attr_diff_cr: Attr_Diff commit result object + */ function ws_diff_merge__attr(attr_diff_spec, attr_diff_cr) { - console.log('ws: rx: diff_merge__attr'); - var attr_diff_json = JSON.parse(attr_diff_raw); - var attr_diff = model_diff.new_attr_diff(attr_diff_json); + var attr_diff = model_diff.new_attr_diff_from_spec(attr_diff_spec); // run through validation + console.log('ws: rx: ws_diff_merge__attr, committing wire-adapted topo_diff:', attr_diff); rz_mesh_graph_ref.commit_diff__attr(attr_diff); } |
