summaryrefslogtreecommitdiff
path: root/src/model/diff.js
diff options
context:
space:
mode:
authorLV-426 <lv-426@taproot.org.il>2014-11-17 13:30:06 +0200
committerLV-426 <lv-426@taproot.org.il>2014-11-17 13:30:06 +0200
commit5646c96714c102be2bda3dc3bfa03a1da737d1a5 (patch)
treecefcd6f605b609e24bced1d18771bf80b59b1246 /src/model/diff.js
parent42f0b3fdc68059560858ba957b3aabf7630d2e27 (diff)
Topo_Diff - for_each_X() convenience functions
Diffstat (limited to 'src/model/diff.js')
-rw-r--r--src/model/diff.js16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/model/diff.js b/src/model/diff.js
index 1bcfc5a2..ca9c41c9 100644
--- a/src/model/diff.js
+++ b/src/model/diff.js
@@ -35,6 +35,22 @@ define([],
this.node_set_rm = obj_spec.node_set_rm;
this.node_set_add = obj_spec.node_set_add;
this.link_set_add = obj_spec.link_set_add;
+
+ }
+ Topo_Diff.prototype.for_each_node_add = function(callback, this_arg) {
+ this.node_set_add.forEach(callback, this_arg);
+ }
+
+ Topo_Diff.prototype.for_each_node_rm = function(callback, this_arg) {
+ this.node_set_rm.forEach(callback, this_arg);
+ }
+
+ Topo_Diff.prototype.for_each_link_add = function(callback, this_arg) {
+ this.link_set_add.forEach(callback, this_arg);
+ }
+
+ Topo_Diff.prototype.for_each_link_rm = function(callback, this_arg) {
+ this.link_set_rm.forEach(callback, this_arg);
}
/**