projects
/
photo-tags.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
cb822f5
)
fixed tagcloud
author
Arun Persaud
<arun@nubati.net>
Sat, 10 Nov 2012 20:14:28 +0000
(12:14 -0800)
committer
Arun Persaud
<arun@nubati.net>
Sat, 10 Nov 2012 20:14:28 +0000
(12:14 -0800)
index.php
patch
|
blob
|
history
js/photo-tags.js
patch
|
blob
|
history
diff --git
a/index.php
b/index.php
index bb56f89cf31ae1b94a7e57d508c6fd66d04bc8f8..a4fe2b7f44a7b8eaa27e0f4e98e4e7c7db1ce9f6 100644
(file)
--- a/
index.php
+++ b/
index.php
@@
-75,7
+75,7
@@
function autoversion($file)
<datalist id="MyTags">
</datalist>
<p> Current tags:<span id="currenttags"></span>
<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>
<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 ea6e4c58c40bed3fde7f13a489670bdfa640b14e..49184213b5c0e2c85fa92c99c05f980b62ad91c2 100644
(file)
--- 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")
/* 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")} )
.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 })
});
}
.on("click", function(d) { document.location.href=webbase+'/tag/'+d.name })
});
}