Skip to content

Commit

Permalink
fix(share.js): update share url before displaying modal and sync shar…
Browse files Browse the repository at this point in the history
…e with route stop

update share url before displaying modal and sync share with route stop

fix #245
  • Loading branch information
amoncaldas committed Nov 26, 2021
1 parent 6a9d181 commit bfdf1f7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
6 changes: 1 addition & 5 deletions src/fragments/forms/map-form/components/share/share.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@ import appConfig from '@/config/app-config'
import constants from '@/resources/constants'

export default {
created () {
this.shareUrl = this.currentUrl
},
data: () => ({
isShareModalOpen: false,
shareUrl: null,
Expand All @@ -25,7 +22,6 @@ export default {
}
},
methods: {

/**
* Toggle the url short/full
*/
Expand All @@ -38,6 +34,7 @@ export default {
this.isShortened = !this.isShortened
},
openShare () {
this.shareUrl = this.currentUrl
this.isShareModalOpen = true
},
closeShare () {
Expand All @@ -58,7 +55,6 @@ export default {
*
*/
copyEmbed () {
const url = this.embedCode ? this.shareUrl : this.currentUrl
if (this.copyToClipboard(this.embedCode)) {
this.showSuccess(this.$t('share.embedCodeCopied'), { timeout: 2000 })
}
Expand Down
2 changes: 1 addition & 1 deletion src/resources/constants.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const constants = {
apiVersion: '5.0',
orsPublicHost: 'https://openrouteservice.org',
orsPublicHost: 'https://maps.openrouteservice.org',
orsApiRequestTimeout: 40000,
publicEndpoints: {
directions: 'pdirections',
Expand Down

0 comments on commit bfdf1f7

Please sign in to comment.