-
Notifications
You must be signed in to change notification settings - Fork 4
Rain visualisation #9
base: master
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -117,6 +117,10 @@ | |
fill: ivory; | ||
} | ||
|
||
.raindrop { | ||
fill: blue; | ||
} | ||
|
||
.line { | ||
pointer-events: none; | ||
stroke-width: 3; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -59,6 +59,15 @@ export const params = createSelector(forecasts, timestamp, pMin, (forecasts, tim | |
}); | ||
|
||
params.level = levels; | ||
params.snow = false; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. A supprime si pas utilise? |
||
params.rain = false; | ||
const nextfc = forecasts.forecast.data.ts.findIndex((t) => t >= timestamp); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Cette ligne va dans le if en dessous, right? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. oups! Le if teste nextfc et pas next ! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Je pense que tu peux utiliser |
||
if (next != -1) { | ||
const previousfc = Math.max(0, next - 1); | ||
const nearestfc = forecasts.forecast.data.ts[nextfc] - timestamp > timestamp - forecasts.forecast.data.ts[previousfc] ? previousfc : nextfc; | ||
params.rain = forecasts.forecast.data.rain[nearestfc] > 0; | ||
params.snow = forecasts.forecast.data.snow[nearestfc] > 0; | ||
} | ||
|
||
const wind = params.wind_u.map((u, index) => { | ||
const v = params.wind_v[index]; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tu pourrais directement passer rain au lieu de params?