summaryrefslogtreecommitdiff
path: root/web/taginfo.rb
diff options
context:
space:
mode:
authorJochen Topf <jochen@topf.org>2012-01-15 20:59:34 +0100
committerJochen Topf <jochen@topf.org>2012-01-15 20:59:34 +0100
commitab6e34d587c7c3d3e29879ddd9940c773c625b54 (patch)
tree61588cad2239a0ce68258195e056a9ab868b2972 /web/taginfo.rb
parent9c67aade591f66550ae45df6b6b34e8fa699b76a (diff)
downloadtaginfo-ab6e34d587c7c3d3e29879ddd9940c773c625b54.tar
taginfo-ab6e34d587c7c3d3e29879ddd9940c773c625b54.tar.gz
Remove config option for javascript cloud size, this is now autosizing
Diffstat (limited to 'web/taginfo.rb')
-rwxr-xr-xweb/taginfo.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/web/taginfo.rb b/web/taginfo.rb
index b84eeba..962baf2 100755
--- a/web/taginfo.rb
+++ b/web/taginfo.rb
@@ -148,7 +148,9 @@ class Taginfo < Sinatra::Base
#-------------------------------------
get '/' do
- tagcloud_number_of_tags = TaginfoConfig.get('tagcloud.number_of_tags', 200)
+ # This is the maximum number of tags in the tag cloud. Javascript code will remove tags if the
+ # window is to small to show all of them.
+ tagcloud_number_of_tags = 260
@tags = @db.select("SELECT key, scale1 FROM popular_keys ORDER BY scale1 DESC LIMIT #{ tagcloud_number_of_tags }").
execute().
each_with_index{ |tag, idx| tag['pos'] = (tagcloud_number_of_tags - idx) / tagcloud_number_of_tags.to_f }.