diff options
author | Arun Persaud <arun@nubati.net> | 2012-11-10 12:14:28 -0800 |
---|---|---|
committer | Arun Persaud <arun@nubati.net> | 2012-11-10 12:14:28 -0800 |
commit | e9dd5689bdfe5800c9d0f5ee4d39c90dd1d0e116 (patch) | |
tree | 9df87ae7348f85fffeb0b0f6a72866adcd99a3e2 | |
parent | cb822f5550deb1f1a904f9b94ee6bbe569c3e056 (diff) | |
download | photo-tags-e9dd5689bdfe5800c9d0f5ee4d39c90dd1d0e116.tar.gz photo-tags-e9dd5689bdfe5800c9d0f5ee4d39c90dd1d0e116.tar.bz2 photo-tags-e9dd5689bdfe5800c9d0f5ee4d39c90dd1d0e116.zip |
fixed tagcloud
-rw-r--r-- | index.php | 2 | ||||
-rw-r--r-- | js/photo-tags.js | 4 |
2 files changed, 3 insertions, 3 deletions
@@ -75,7 +75,7 @@ function autoversion($file) <datalist id="MyTags"> </datalist> <p> Current tags:<span id="currenttags"></span> - <button class="next btn btn-small btn-info" onclick="tagcloud()">tag cloud</button> + <a class="next btn btn-small btn-info" onclick="tagcloud()">tag cloud</a> <a class="btn btn-small btn-success" href='<?php echo $webbase?>'>all</a> </p> </form> 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 }) }); } |