Fixes showLocarionsByItem integration with compound values. #693.

This commit is contained in:
mateuswetah 2023-01-10 11:10:59 -03:00
parent 403d7534af
commit 5b4bd4eac4
1 changed files with 2 additions and 2 deletions

View File

@ -1492,7 +1492,7 @@
:label="$i18n.get('label_actions')">
<a
id="button-delete"
v-if="item['metadata'][selectedGeocoordinateMetadatum.slug] && item['metadata'][selectedGeocoordinateMetadatum.slug].value && item['metadata'][selectedGeocoordinateMetadatum.slug].value.length"
v-if="itemsLocations.some(anItemLocation => anItemLocation.item.id == item.id)"
:aria-label="$i18n.get('label_show_item_location_on_map')"
@click.prevent.stop="showLocationsByItem(item)">
<span
@ -2208,7 +2208,7 @@ export default {
this.selectedMarkerIndexes = [];
this.selectedMarkerIndexes.push(index);
if ( this.itemsLocations.length && this.$refs['tainacan-admin-view-mode-map'] && this.$refs['tainacan-admin-view-mode-map'].mapObject )
this.$refs['tainacan-admin-view-mode-map'].mapObject.panInsideBounds( [ this.itemsLocations[0].location ], { animate: true });
this.$refs['tainacan-admin-view-mode-map'].mapObject.panInsideBounds( [ this.itemsLocations[index].location ], { animate: true });
},
showLocationsByItem(item) {
this.selectedMarkerIndexes = [];