Skip to content

Commit

Permalink
fix: attempt to fix user marker color not changing correctly
Browse files Browse the repository at this point in the history
Signed-off-by: Alexander Trost <[email protected]>
  • Loading branch information
galexrt committed Jul 23, 2024
1 parent 42ba287 commit afa92ac
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/components/livemap/MapUserMarker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,13 @@ const { goto } = useLivemapStore();
const centrumStore = useCentrumStore();
const { units } = storeToRefs(centrumStore);
function getMarkerColor(): string {
const markerColor = computed(() => {
if (activeChar.value !== null && props.marker.user?.userId === activeChar.value?.userId) {
return livemap.userMarkers.activeCharColor;
} else {
return props.marker.info?.color ?? livemap.userMarkers.fallbackColor;
}
}
});
const unit = computed(() => (props.marker.unitId !== undefined ? units.value.get(props.marker.unitId) : undefined));
const unitInverseColor = computed(() => {
Expand Down Expand Up @@ -78,7 +78,7 @@ const unitStatusColor = computed(() => unitStatusToBGColor(unit.value?.status?.s
>
{{ unit?.initials }}
</span>
<MapMarkerIcon class="size-full" :style="{ color: getMarkerColor() }" />
<MapMarkerIcon class="size-full" :style="{ color: markerColor }" />
</div>
<div v-if="showUnitStatus && unit" class="pointer-events-none uppercase">
<span class="absolute right-0 top-0 -mr-2 -mt-1.5 flex size-3">
Expand Down

0 comments on commit afa92ac

Please sign in to comment.