mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-23 16:13:50 +00:00
#16 replace hardcoded country and map_center in vue add-address by symfony config yaml variables
This commit is contained in:
@@ -309,8 +309,11 @@ export default {
|
||||
addressMap: {
|
||||
// Note: LeafletJs demands [lat, lon]
|
||||
// cfr https://macwright.com/lonlat/
|
||||
center : [48.8589, 2.3469],
|
||||
zoom: 12
|
||||
center : [
|
||||
this.context.defaults.map_center.x,
|
||||
this.context.defaults.map_center.y
|
||||
],
|
||||
zoom: this.context.defaults.map_center.z
|
||||
},
|
||||
},
|
||||
errorMsg: []
|
||||
|
@@ -44,7 +44,7 @@ export default {
|
||||
//console.log('update map with : ', this.entity.addressMap.center)
|
||||
if (this.marker && this.entity.addressMap.center) {
|
||||
this.marker.setLatLng(this.entity.addressMap.center);
|
||||
this.map.setView(this.entity.addressMap.center, 15);
|
||||
this.map.setView(this.entity.addressMap.center, this.entity.addressMap.zoom);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@@ -30,7 +30,7 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
value: this.selectCountryByCode(
|
||||
this.context.edit ? this.entity.selected.country.code : 'FR'
|
||||
this.context.edit ? this.entity.selected.country.code : this.context.defaults.default_country
|
||||
)
|
||||
}
|
||||
},
|
||||
|
@@ -102,7 +102,7 @@ export default {
|
||||
],
|
||||
emits: ['openEditPane'],
|
||||
mounted() {
|
||||
console.log('context', this.context)
|
||||
//console.log('context', this.context)
|
||||
},
|
||||
computed: {
|
||||
address() {
|
||||
|
Reference in New Issue
Block a user