improve tag cloud font size scaling

* use logarithmic scales
 * remove bold style
This commit is contained in:
nodiscc 2014-12-24 20:00:17 +01:00 committed by Knah Tsaeb
parent 132acc4e95
commit 4c6847df8b
1 changed files with 2 additions and 2 deletions

View File

@ -1329,9 +1329,9 @@ function renderPage()
ksort($tags);
$tagList=array();
foreach($tags as $key=>$value)
// Tag font size scaling: default 15 and 30 logarithm bases affect scaling, 22 and 6 are arbitrary font sizes for max and min sizes.
{
//$tagList[$key] = array('count'=>$value,'size'=>max(40*$value/$maxcount,8));
$tagList[$key] = array('count'=>$value,'size'=>round(min(max($maxcount*$value/$linkCount,0.8),4.5),2), 'max'=>$maxcount);
$tagList[$key] = array('count'=>$value,'size'=>log($value, 5) / log($maxcount, 3) * (4.8-0.8) + 0.8);
}
$PAGE = new pageBuilder;
$PAGE->assign('linkcount',count($LINKSDB));