@@ -510,7 +513,8 @@
}}
on:click={onMapClick}
class:hidden={openedSystem != null}
- class:cursor-pointer={(mapModes[$mapSettings.mapMode]?.hasPov && tooltip?.countryId) ||
+ class:cursor-pointer={(mapModes[$mapSettings.mapMode]?.hasPov &&
+ tooltip?.countryId != null) ??
(tooltip != null && !tooltip.hidden)}
class="h-full w-full"
>
diff --git a/src/renderer/src/lib/map/MapTooltip.svelte b/src/renderer/src/lib/map/MapTooltip.svelte
index 8f41af2..e1af778 100644
--- a/src/renderer/src/lib/map/MapTooltip.svelte
+++ b/src/renderer/src/lib/map/MapTooltip.svelte
@@ -1,7 +1,8 @@
import * as d3Shape from 'd3-shape';
+ import type { PickByValue } from 'utility-types';
+
import {
- mapSettings,
- mapSettingsConfig,
type IconMapSettings,
type MapSettings,
+ mapSettings,
+ mapSettingsConfig,
type SettingConfigIcon,
} from '../settings';
import { mapModes } from './data/mapModes';
@@ -16,7 +18,7 @@
export let colors: Record;
interface IconSettingMetadata {
- systemProperty?: keyof ProcessedSystem;
+ systemProperty?: keyof PickByValue;
mustKnowOwner?: boolean;
}
const metadata: Record = {
diff --git a/src/renderer/src/lib/map/data/processLabels.ts b/src/renderer/src/lib/map/data/processLabels.ts
index 0c13ed2..0a736d1 100644
--- a/src/renderer/src/lib/map/data/processLabels.ts
+++ b/src/renderer/src/lib/map/data/processLabels.ts
@@ -169,10 +169,14 @@ export default function processLabels(
}
return {
point: inverseX(pointFromGeoJSON(point)),
- emblemWidth: emblemWidth != null ? emblemWidth * SCALE : null,
- emblemHeight: emblemWidth != null ? emblemWidth * emblemAspectRatio * SCALE : null,
- textWidth: textWidth != null ? textWidth * SCALE : null,
- textHeight: textWidth != null ? textWidth * textAspectRatio * SCALE : null,
+ emblemWidth: emblemWidth != null && emblemWidth > 0 ? emblemWidth * SCALE : null,
+ emblemHeight:
+ emblemWidth != null && emblemWidth > 0
+ ? emblemWidth * emblemAspectRatio * SCALE
+ : null,
+ textWidth: textWidth != null && textWidth > 0 ? textWidth * SCALE : null,
+ textHeight:
+ textWidth != null && textWidth > 0 ? textWidth * textAspectRatio * SCALE : null,
};
})
: [];
diff --git a/src/renderer/src/lib/map/solarSystemMap/SolarSystemMap.svelte b/src/renderer/src/lib/map/solarSystemMap/SolarSystemMap.svelte
index f3cbd96..79462e3 100644
--- a/src/renderer/src/lib/map/solarSystemMap/SolarSystemMap.svelte
+++ b/src/renderer/src/lib/map/solarSystemMap/SolarSystemMap.svelte
@@ -1,9 +1,10 @@