Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SRCT
weather
Commits
ef021983
Commit
ef021983
authored
May 23, 2017
by
Zach Knox
Browse files
Merge branch 'rounded-precipProb' into 'master'
rounded precipitation probability See merge request
!10
parents
8c334e77
7d3dc1d0
Changes
2
Hide whitespace changes
Inline
Side-by-side
weather/client/views/weather/weather.html
View file @
ef021983
...
...
@@ -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"
>
{{w
a
atherData.alerts.description}}
{{w
e
atherData.alerts.description}}
</div>
</div>
</div>
...
...
weather/client/views/weather/weather.js
View file @
ef021983
...
...
@@ -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)
"
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment