summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Wu <peter@lekensteyn.nl>2014-05-20 23:45:17 +0200
committerPeter Wu <peter@lekensteyn.nl>2014-05-20 23:45:17 +0200
commitc5deea9a782602989c0c5a9004e53f617cc642d8 (patch)
tree617c910e45e41e73540e1726d76ef1b1853f87be
parenteb0c286f817e3bd769e6fa3b8bc3c283f38574da (diff)
downloadd3viz-c5deea9a782602989c0c5a9004e53f617cc642d8.tar.gz
Define ticks if button is not used
The tick function tries to increment this value.
-rw-r--r--bubble.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/bubble.js b/bubble.js
index 6b735b3..fd59b32 100644
--- a/bubble.js
+++ b/bubble.js
@@ -399,9 +399,10 @@ function run() {
// initialize SVG element and force
initSvg();
+
+// Set PROFILE=1 to enable profiling when using the button.
+var ticks = 0, PROFILE = 1;
if (/no-auto/.test(location.search)) {
- var ticks = 0;
- var PROFILE = 1;
// advanced stuff here: profiling!
d3.select('body').append('button')
.style('position', 'absolute')