Skip to content

Commit

Permalink
feat: remove distance and duration text from route popup (#366)
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
  • Loading branch information
TheGreatRefrigerator committed May 30, 2023
2 parents c7748ec + 6f5e0b8 commit 6e4d420
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 6e4d420

Please sign in to comment.