Skip to content

Commit

Permalink
Fix unlisted markers being counted
Browse files Browse the repository at this point in the history
  • Loading branch information
TBlueF committed Jan 14, 2024
1 parent 6ce32c5 commit d6e4e69
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions BlueMapCommon/webapp/src/components/Menu/MarkerSet.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
<SwitchHandle :on="markerSet.visible" v-if="markerSet.toggleable"/>
</div>
<div class="stats">
<div v-if="markerSet.markers.length > 0">
{{ markerSet.markers.length }}
{{ $t('markers.marker', markerSet.markers.length) }}
<div v-if="filteredMarkerCount > 0">
{{ filteredMarkerCount }}
{{ $t('markers.marker', filteredMarkerCount) }}
</div>
<div v-if="filteredMarkerSetCount > 0">
{{ filteredMarkerSetCount }}
Expand Down Expand Up @@ -46,6 +46,13 @@ export default {
}
return count;
},
filteredMarkerCount() {
let count = 0;
for (let marker of this.markerSet.markers) {
if (marker.listed) count++;
}
return count;
},
label() {
if (this.markerSet.id === "bm-players") return this.$t("players.title");
return this.markerSet.label;
Expand Down

0 comments on commit d6e4e69

Please sign in to comment.