diff options
| author | LV-426 <lv-426@taproot.org.il> | 2015-01-11 16:18:40 +0200 |
|---|---|---|
| committer | LV-426 <lv-426@taproot.org.il> | 2015-01-11 18:30:43 +0200 |
| commit | ad1f48004b018c2e465f89ad1f601a00af141f36 (patch) | |
| tree | 8070c9295e17a7fa73387d1b7b88323150268208 /src/client | |
| parent | 3b72ea8c340045bf73cba5b4c95078572c70eaf5 (diff) | |
Attr_Diff: remove spec from constructor, force use of prototype aux functions
Diffstat (limited to 'src/client')
| -rw-r--r-- | src/client/model/diff.js | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/client/model/diff.js b/src/client/model/diff.js index c41fbc53..5d7755ed 100644 --- a/src/client/model/diff.js +++ b/src/client/model/diff.js @@ -57,7 +57,7 @@ define([], * Attribute diff object, organized by type, where currently * node,link types are supported */ - function Attr_Diff(obj_spec) { + function Attr_Diff() { this.__type_node = {}; this.__type_link = {}; } @@ -75,6 +75,9 @@ define([], '__attr_remove' : [] }; + this.id_to_node_map = this.__type_node; + this.id_to_link_map = this.__type_link; + return this; } @@ -146,12 +149,12 @@ define([], return ret; } - function new_attr_diff(obj_spec) { + function new_attr_diff() { /* * validate obj_spec */ // TODO - var ret = new Attr_Diff(obj_spec); + var ret = new Attr_Diff(); ret.__type_node = {}; // id-to-obj map ret.__type_link = {}; // id-to-obj map return ret; |
