diff options
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/rhizicore.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/scripts/rhizicore.js b/scripts/rhizicore.js index 34cfddc2..d96e7226 100644 --- a/scripts/rhizicore.js +++ b/scripts/rhizicore.js @@ -313,6 +313,18 @@ function myGraph(el) { } + var hasNode = function(id, state) { + var i; + id = id.toLowerCase(); + for (i = 0 ; i < nodes.length; ++i) { + if (nodes[i].id == id && nodes[i].state == state) { + return true; + } + } + return false; + } + this.hasNode = hasNode; + var findNode = function(id, state) { id = id && id.toLowerCase(); for (var i = 0; i < nodes.length; i++) { |
