summaryrefslogtreecommitdiff
path: root/scripts/model
diff options
context:
space:
mode:
authorLV-426 <lv-426@taproot.org.il>2014-11-09 19:14:57 +0200
committerLV-426 <lv-426@taproot.org.il>2014-11-09 19:14:57 +0200
commitb8f0712be319ad46c2ffe18966cf75a0a9de1f60 (patch)
tree9200ed2962b50522d4b96ad481436176c4422d82 /scripts/model
parent8af649c249daea983a08d102284d571f0e88267b (diff)
addNode() - return new node on success, avoid need to attach a signal listener
Diffstat (limited to 'scripts/model')
-rw-r--r--scripts/model/graph.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/scripts/model/graph.js b/scripts/model/graph.js
index 26d833e6..e0881155 100644
--- a/scripts/model/graph.js
+++ b/scripts/model/graph.js
@@ -31,6 +31,7 @@ function Graph(el) {
if (new_node) {
signal.signal(consts.APPLIED_GRAPH_DIFF, [{
nodes: {add: [new_node]}}]);
+ return new_node;
}
}