diff options
| author | Alon Levy <alon@pobox.com> | 2015-01-21 16:16:48 +0200 |
|---|---|---|
| committer | Alon Levy <alon@pobox.com> | 2015-01-21 16:18:52 +0200 |
| commit | 96eb2efd8605d41264e5c843b8c8ea22f54f9d5c (patch) | |
| tree | afac5166376edbea729ee1551bede63e72669f2f /src/client/model/diff.js | |
| parent | 1594db29d2330effa71e9adfd78d0d7ecc10124b (diff) | |
client/model/diff: add two helpers on Attr_Diff
Diffstat (limited to 'src/client/model/diff.js')
| -rw-r--r-- | src/client/model/diff.js | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/client/model/diff.js b/src/client/model/diff.js index 5835f5d6..211c9ac1 100644 --- a/src/client/model/diff.js +++ b/src/client/model/diff.js @@ -150,6 +150,20 @@ define([], } /** + * @param id of node to check for inclusion of + */ + Attr_Diff.prototype.has_node_id_attr_write = function(n_id, attr) { + return this.__type_node[n_id] !== undefined && this.__type_node[n_id].__attr_write[attr]; + } + + /** + * @param id of link to check for inclusion of + */ + Attr_Diff.prototype.has_link_id_attr_write = function(n_id, attr) { + return this.__type_link[n_id] !== undefined && this.__type_link[n_id].__attr_write[attr]; + } + + /** * Visual diff object expressing any visual change to the state of a * particular visualization type. * |
