diff options
| author | Alon Levy <alon@pobox.com> | 2015-07-23 18:27:31 +0300 |
|---|---|---|
| committer | Alon Levy <alon@pobox.com> | 2015-07-23 18:27:31 +0300 |
| commit | a694c47561355a5a4c8861a57ec2fe04c0247fbb (patch) | |
| tree | f27218a3f82e99464775fa01a579a6cda0f7a191 /src/client/model | |
| parent | 78189c857fdf52854fc8b32352f6fa869e0af013 (diff) | |
client/model/graph: make addTempNode API a constant (fix FIXME)
Diffstat (limited to 'src/client/model')
| -rw-r--r-- | src/client/model/graph.js | 9 |
1 files changed, 4 insertions, 5 deletions
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 = []; |
