mirror of
https://github.com/TracksApp/tracks.git
synced 2026-02-22 23:24:07 +01:00
Split up the font size calculation
The font size is a view concern, but the relative size belongs in the model layer.
This commit is contained in:
parent
f375c06964
commit
3f496db4b4
4 changed files with 12 additions and 7 deletions
|
|
@ -13,8 +13,8 @@ module Stats
|
|||
tags.empty?
|
||||
end
|
||||
|
||||
def font_size(tag)
|
||||
(9 + 2*(tag.count-min)/divisor)
|
||||
def relative_size(tag)
|
||||
(tag.count - min) / divisor
|
||||
end
|
||||
|
||||
private
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue