From: Arun Persaud Date: Sat, 10 Nov 2012 20:14:28 +0000 (-0800) Subject: fixed tagcloud X-Git-Url: https://git.nubati.net/cgi-bin/gitweb.cgi?p=photo-tags.git;a=commitdiff_plain;h=e9dd5689bdfe5800c9d0f5ee4d39c90dd1d0e116;ds=sidebyside fixed tagcloud --- diff --git a/index.php b/index.php index bb56f89..a4fe2b7 100644 --- a/index.php +++ b/index.php @@ -75,7 +75,7 @@ function autoversion($file)

Current tags: - + all

diff --git a/js/photo-tags.js b/js/photo-tags.js index ea6e4c5..4918421 100644 --- a/js/photo-tags.js +++ b/js/photo-tags.js @@ -130,10 +130,10 @@ function tagcloud() { /* update pics */ d3.json(url, function(json) { svgelement.selectAll("text").data(json).enter().append("text") - .style("font-size", function(d){return (Math.log(d.count+1)/2.0)+"em"}) + .style("font-size", function(d){return (Math.log(d.count+1)/3.0+0.5)+"em"}) .text(function(d) { return d.name+" "; }) .on("mouseover", function(d){ d3.select(this).style("color","red")} ) - .on("mouseout", function(d){ d3.select(this).style("color","white")} ) + .on("mouseout", function(d){ d3.select(this).style("color","black")} ) .on("click", function(d) { document.location.href=webbase+'/tag/'+d.name }) }); }