Commit 7d3dc1d0 authored by Zac Wood's avatar Zac Wood

rounded precipitation probability

parent 8c334e77
......@@ -8,7 +8,7 @@
<h1 class="mdl-card__title-text"><a href="{{weatherData.alerts.url}}">{{weatherData.alerts.title}}</a> until {{formatTimestamp weatherData.alerts.expires}}<br /></h1>
</div>
<div class="mdl-card__supporting-text">
{{waatherData.alerts.description}}
{{weatherData.alerts.description}}
</div>
</div>
</div>
......
......@@ -7,7 +7,7 @@ Template.weather.helpers({
//Convert precipitation percentage to words
precipitationWords: function(rawPrecipProb) {
weatherDataDependency.depend();
var precipProb = rawPrecipProb * 100;
var precipProb = Math.round(rawPrecipProb * 100);
if(weatherData === undefined) return "...";
if(precipProb === 0) return "No Precipitation";
if(precipProb >= 90) return "Bring an Umbrella ("+precipProb+"% chance)";
......
  • Weird percentages like "54.11111111111" were showing on the weather cards, this fixes that along with a random typo

Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment