summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Wu <peter@lekensteyn.nl>2014-05-21 19:21:38 +0200
committerPeter Wu <peter@lekensteyn.nl>2014-05-21 19:21:38 +0200
commit4294ddb0811bb1af2812a75778af1bab7dfde511 (patch)
treeaf1864aa48755110a6743daeb0816ce72056fa0a
parenta0f1f7514bd90703dff5ed5ce7ab52353864eba1 (diff)
downloadd3viz-4294ddb0811bb1af2812a75778af1bab7dfde511.tar.gz
Button to refresh spam status
-rw-r--r--js/spam.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/js/spam.js b/js/spam.js
index 2b70ace..da3a99a 100644
--- a/js/spam.js
+++ b/js/spam.js
@@ -314,6 +314,18 @@ function processData(data) {
infoPane.on('mousedown.drag', null);
});
+ infoPane.select('.content')
+ .insert('button', ':first-child')
+ .text('Spam update')
+ .on('click', function () {
+ refreshSpam();
+ d3.select(this)
+ .style('opacity', '0')
+ .transition()
+ .duration(1000)
+ .style('opacity', '1');
+ });
+
function dragger() {
var changes = {
'left': d3.event.dx,