diff options
| author | Alon Levy <alon@pobox.com> | 2014-10-06 15:02:44 +0300 |
|---|---|---|
| committer | Alon Levy <alon@pobox.com> | 2014-10-07 08:51:35 +0300 |
| commit | 853fcff36c500f5317e58fbff3a1700044076343 (patch) | |
| tree | ba72c9282d277b6d106d071f7d960f1643e3c0cc /scripts | |
| parent | 63938de286eedf35e4eba836ca56b5d76217dfa5 (diff) | |
rhizicore: add helper debug_print
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/rhizicore.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/scripts/rhizicore.js b/scripts/rhizicore.js index 37b61330..29944756 100644 --- a/scripts/rhizicore.js +++ b/scripts/rhizicore.js @@ -692,6 +692,15 @@ function myGraph(el) { var graph = new myGraph(document.body); +var debug_print = function(message) { + var element = $(".debug"); + if (element.length == 1) { + element.html(message); + } else { + console.log(message); + } +} + var newnodes=1; function tick(e) { //console.log(e); |
