facilmap/frontend/src/map/ui/elevation-stats/elevation-stats.vue

20 wiersze
931 B
Vue
Czysty Zwykły widok Historia

2021-03-21 22:38:48 +00:00
<span class="fm-elevation-stats">
<span>
<Icon icon="triangle-top" alt="Ascent"></Icon> {{route.ascent}} m / <Icon icon="triangle-bottom" alt="Descent"></Icon> {{route.descent}} m
</span>
<b-button :id="`fm-elevation-stats-${id}`" v-b-tooltip="'Show elevation statistics'"><Icon icon="info-circle" alt="Show stats"></Icon></b-button>
<b-popover :target="`fm-elevation-stats-${id}`" placement="bottom" triggers="click blur" custom-class="fm-elevation-stats-popover">
2021-03-07 21:56:30 +00:00
<dl class="row">
2021-03-19 21:16:57 +00:00
<dt class="col-sm-6">Total ascent</dt>
<dd class="col-sm-6">{{route.ascent}} m</dd>
2021-03-07 21:56:30 +00:00
2021-03-19 21:16:57 +00:00
<dt class="col-sm-6">Total descent</dt>
<dd class="col-sm-6">{{route.descent}} m</dd>
2021-03-07 21:56:30 +00:00
<template v-for="stat in statsArr">
2021-03-19 21:16:57 +00:00
<dt class="col-sm-6">{{stat.i == 0 ? '0%' : stat.i < 0 ? "≤ "+stat.i+"%" : "≥ "+stat.i+"%"}}</dt>
<dd class="col-sm-6">{{stat.distance | round(2)}} km</dd>
2021-03-07 21:56:30 +00:00
</template>
</dl>
</b-popover>
</span>