mirror of
https://github.com/BlueMap-Minecraft/BlueMap.git
synced 2025-02-16 12:31:58 +01:00
Fix unlisted markers being counted
This commit is contained in:
parent
6ce32c56dc
commit
d6e4e69417
@ -6,9 +6,9 @@
|
|||||||
<SwitchHandle :on="markerSet.visible" v-if="markerSet.toggleable"/>
|
<SwitchHandle :on="markerSet.visible" v-if="markerSet.toggleable"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="stats">
|
<div class="stats">
|
||||||
<div v-if="markerSet.markers.length > 0">
|
<div v-if="filteredMarkerCount > 0">
|
||||||
{{ markerSet.markers.length }}
|
{{ filteredMarkerCount }}
|
||||||
{{ $t('markers.marker', markerSet.markers.length) }}
|
{{ $t('markers.marker', filteredMarkerCount) }}
|
||||||
</div>
|
</div>
|
||||||
<div v-if="filteredMarkerSetCount > 0">
|
<div v-if="filteredMarkerSetCount > 0">
|
||||||
{{ filteredMarkerSetCount }}
|
{{ filteredMarkerSetCount }}
|
||||||
@ -46,6 +46,13 @@ export default {
|
|||||||
}
|
}
|
||||||
return count;
|
return count;
|
||||||
},
|
},
|
||||||
|
filteredMarkerCount() {
|
||||||
|
let count = 0;
|
||||||
|
for (let marker of this.markerSet.markers) {
|
||||||
|
if (marker.listed) count++;
|
||||||
|
}
|
||||||
|
return count;
|
||||||
|
},
|
||||||
label() {
|
label() {
|
||||||
if (this.markerSet.id === "bm-players") return this.$t("players.title");
|
if (this.markerSet.id === "bm-players") return this.$t("players.title");
|
||||||
return this.markerSet.label;
|
return this.markerSet.label;
|
||||||
|
Loading…
Reference in New Issue
Block a user