Skip to content

Commit

Permalink
feat: remove distance and duration text from route popup
Browse files Browse the repository at this point in the history
as the value and unit is enough to infer what it describes,
the localized strings for distance and duration are removed

also
- move duration above distance
- make duration bold
  • Loading branch information
TheGreatRefrigerator committed May 30, 2023
1 parent c7748ec commit 6f5e0b8
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -191,10 +191,11 @@ export default {
if (this.route.summary) {
const summaryCopy = Object.assign({}, this.route.summary)
const humanizedData = GeoUtils.getHumanizedTimeAndDistance(summaryCopy, this.$t('global.units'))
let tooltipInnerContent = `${this.$t('global.distance')}: ${humanizedData.distance}`
let tooltipInnerContent = ''
if (humanizedData.duration) {
tooltipInnerContent += `<br> ${this.$t('global.duration')}: ${humanizedData.duration}`
tooltipInnerContent += `<b>${humanizedData.duration}</b><br>`
}
tooltipInnerContent += `${humanizedData.distance}`
let tooltipIcon = this.tooltipIcon
if (store.getters.mapSettings.skipAllSegments) {
tooltipIcon = 'arrow_forward'
Expand Down

0 comments on commit 6f5e0b8

Please sign in to comment.