diff options
| author | LV-426 <lv-426@taproot.org.il> | 2014-12-10 15:29:36 +0200 |
|---|---|---|
| committer | Alon Levy <alon@pobox.com> | 2014-12-16 10:59:14 +0200 |
| commit | f81c1c05d6b3dbb5229f3612d8e45de79963cc14 (patch) | |
| tree | 7919a0cb374b576d7b0c37aca2417e04181c8e71 /src/model | |
| parent | fe01fba24eab3f42142803e3227e9b0a93dfbd89 (diff) | |
Node.prototype.equals(): compare by id
Diffstat (limited to 'src/model')
| -rw-r--r-- | src/model/core.js | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/model/core.js b/src/model/core.js index c750ff53..cb5dca59 100644 --- a/src/model/core.js +++ b/src/model/core.js @@ -39,6 +39,9 @@ define(['util'], function(util) { function Node() { } + Node.prototype.equals = function(other_node){ + return this.id == other_node.id; + } function Link() { } |
