From 853fcff36c500f5317e58fbff3a1700044076343 Mon Sep 17 00:00:00 2001 From: Alon Levy Date: Mon, 6 Oct 2014 15:02:44 +0300 Subject: rhizicore: add helper debug_print --- scripts/rhizicore.js | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'scripts') 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); -- cgit v1.3.1