From f81c1c05d6b3dbb5229f3612d8e45de79963cc14 Mon Sep 17 00:00:00 2001 From: LV-426 Date: Wed, 10 Dec 2014 15:29:36 +0200 Subject: Node.prototype.equals(): compare by id --- src/model/core.js | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/model') 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() { } -- cgit v1.3.1