diff --git a/src/components/sidebar/WorldListItem.vue b/src/components/sidebar/WorldListItem.vue index 8591190..0031922 100644 --- a/src/components/sidebar/WorldListItem.vue +++ b/src/components/sidebar/WorldListItem.vue @@ -23,7 +23,8 @@ v-bind:value="[world.name,map.name]" v-model="currentMap" :aria-labelledby="`${name}-${world.name}-${key}-label`"> @@ -110,7 +111,7 @@ export default defineComponent({ height: 3.2rem; margin-right: 0.5rem; - .svg-icon { + .svg-icon, img { top: 0.2rem !important; right: 0.2rem !important; bottom: 0.2rem !important; diff --git a/src/model/LiveAtlasMapDefinition.ts b/src/model/LiveAtlasMapDefinition.ts index 2fa52fd..80d1981 100644 --- a/src/model/LiveAtlasMapDefinition.ts +++ b/src/model/LiveAtlasMapDefinition.ts @@ -91,10 +91,18 @@ export default class LiveAtlasMapDefinition { : {x: latLng.lng / this.scale, y: y, z: -latLng.lat / this.scale}; } + hasCustomIcon(): boolean { + return !!this.icon; + } + getIcon(): string { let worldType: string, mapType: string; + if(this.icon) { + return this.icon; + } + switch(this.world.dimension) { case 'nether': worldType = 'nether'; diff --git a/src/providers/Pl3xmapMapProvider.ts b/src/providers/Pl3xmapMapProvider.ts index ccdd8da..866da14 100644 --- a/src/providers/Pl3xmapMapProvider.ts +++ b/src/providers/Pl3xmapMapProvider.ts @@ -142,7 +142,7 @@ export default class Pl3xmapMapProvider extends MapProvider { background: 'transparent', backgroundDay: 'transparent', backgroundNight: 'transparent', - icon: undefined, + icon: world.icon ? `${this.config.pl3xmap}images/icon/${world.icon}.png` : undefined, imageFormat: 'png', name: 'flat', displayName: 'Flat', diff --git a/src/scss/_mixins.scss b/src/scss/_mixins.scss index 76c7ccc..85d99d0 100644 --- a/src/scss/_mixins.scss +++ b/src/scss/_mixins.scss @@ -42,7 +42,7 @@ line-height: 2rem; -webkit-tap-highlight-color: transparent; - .svg-icon { + .svg-icon, img { display: inline-block; max-width: 3rem; max-height: 3rem;