summaryrefslogtreecommitdiff
path: root/src/model
diff options
context:
space:
mode:
authorAlon Levy <alon@pobox.com>2014-11-24 15:53:00 +0200
committerAlon Levy <alon@pobox.com>2014-11-24 15:53:00 +0200
commit6e681d0915ef361a2839afce591efc6fccf1a85f (patch)
tree030f72fd4b019817d72404fe482d99ef475728e6 /src/model
parent9e1b4b476d6d14f42eab082e77620e2ff5591f81 (diff)
core/graph: reduce verbose debug logs to console
Diffstat (limited to 'src/model')
-rw-r--r--src/model/core.js1
-rw-r--r--src/model/graph.js13
2 files changed, 8 insertions, 6 deletions
diff --git a/src/model/core.js b/src/model/core.js
index 5dfd14fc..4933950c 100644
--- a/src/model/core.js
+++ b/src/model/core.js
@@ -81,7 +81,6 @@ define([], function() {
ret.end = node_spec.end;
ret.x = node_spec.x;
ret.y = node_spec.y;
- console.log(ret);
return ret;
}
diff --git a/src/model/graph.js b/src/model/graph.js
index 44628447..6d13a83e 100644
--- a/src/model/graph.js
+++ b/src/model/graph.js
@@ -3,6 +3,8 @@
define(['signal', 'consts', 'util', 'model/core', 'model/util', 'rz_api_backend', 'rz_api_mesh'],
function (signal, consts, util, model_core, model_util, rz_api_backend, rz_api_mesh) {
+var debug = false;
+
function Graph() {
var nodes = [],
@@ -34,11 +36,12 @@ function Graph() {
return;
}else{
node = model_core.create_node__set_random_id(node);
- // TODO clean
- if ('bubble' == node.type){
- console.debug('__addNode: stamping node id: ' + node.id + ', name: \'' + node.name + '\' (bubble)');
- }else {
- console.debug('__addNode: stamping node id: ' + node.id + ', name: \'' + node.name + '\'');
+ if (debug) {
+ if ('bubble' == node.type){
+ console.debug('__addNode: stamping node id: ' + node.id + ', name: \'' + node.name + '\' (bubble)');
+ }else {
+ console.debug('__addNode: stamping node id: ' + node.id + ', name: \'' + node.name + '\'');
+ }
}
}
}