Skip to content
This repository has been archived by the owner on Nov 7, 2024. It is now read-only.

Commit

Permalink
smaller fontsize if incidence is over >= 1000 #172
Browse files Browse the repository at this point in the history
  • Loading branch information
rphl committed Nov 10, 2021
1 parent 4fb3ab8 commit 91f115d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion incidence.js
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,8 @@ class UIComp {
let incidence = ENV.cache[cacheID].getDay().incidence
let incidenceFormatted = Format.number(incidence, 1, 'n/v', 100)
let incidenceParts = incidenceFormatted.split(",")
ib.text(incidenceParts[0], Font.boldMonospacedSystemFont(26), UI.getIncidenceColor(incidence), 1, 1)
let incidenceFontsize = (incidence >= 1000) ? 19 : 26;
ib.text(incidenceParts[0], Font.boldMonospacedSystemFont(incidenceFontsize), UI.getIncidenceColor(incidence), 1, 1)
if (typeof incidenceParts[1] !== "undefined") {
ib.text(',' + incidenceParts[1], Font.boldMonospacedSystemFont(18), UI.getIncidenceColor(incidence), 1, 1)
}
Expand Down

0 comments on commit 91f115d

Please sign in to comment.