summaryrefslogtreecommitdiff
path: root/src/model/core.js
diff options
context:
space:
mode:
authorLV-426 <lv-426@taproot.org.il>2014-12-10 15:29:36 +0200
committerAlon Levy <alon@pobox.com>2014-12-16 10:59:14 +0200
commitf81c1c05d6b3dbb5229f3612d8e45de79963cc14 (patch)
tree7919a0cb374b576d7b0c37aca2417e04181c8e71 /src/model/core.js
parentfe01fba24eab3f42142803e3227e9b0a93dfbd89 (diff)
Node.prototype.equals(): compare by id
Diffstat (limited to 'src/model/core.js')
-rw-r--r--src/model/core.js3
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() {
}