From a694c47561355a5a4c8861a57ec2fe04c0247fbb Mon Sep 17 00:00:00 2001 From: Alon Levy Date: Thu, 23 Jul 2015 18:27:31 +0300 Subject: client/model/graph: make addTempNode API a constant (fix FIXME) --- src/client/model/graph.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/client') diff --git a/src/client/model/graph.js b/src/client/model/graph.js index 5beca9e0..a0717bd3 100644 --- a/src/client/model/graph.js +++ b/src/client/model/graph.js @@ -83,12 +83,11 @@ function Graph(spec) { * * @return node if node was actually added */ - // FIXME: is this a good idea? i.e. changing API based on constructor? just in dynamic city - if (temporary) { - this.addTempNode = function(spec) { + this.addTempNode = function(spec) { + if (temporary) { return this.__addNode(spec); - }; - } + } + }; var nodes_to_touched_links = function (node_id_set) { var touched_links = []; -- cgit v1.3.1