From 053567d2ad81fefbd5e52e3ba15cf7511205a963 Mon Sep 17 00:00:00 2001
From: Terry Truong <terry06890@gmail.com>
Date: Tue, 28 Jun 2022 11:05:39 +1000
Subject: Add getImagePath() to lib.ts

---
 src/components/TileInfoModal.vue | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

(limited to 'src/components/TileInfoModal.vue')

diff --git a/src/components/TileInfoModal.vue b/src/components/TileInfoModal.vue
index a85fa72..82db5d4 100644
--- a/src/components/TileInfoModal.vue
+++ b/src/components/TileInfoModal.vue
@@ -59,7 +59,8 @@
 import {defineComponent, PropType} from 'vue';
 import CloseIcon from './icon/CloseIcon.vue';
 import {LayoutNode, LayoutOptions} from '../layout';
-import {TolNode, TolMap, getServerResponse, DescInfo, ImgInfo, NodeInfo, InfoResponse, UiOptions} from '../lib';
+import {TolNode, TolMap, getServerResponse, getImagePath,
+	DescInfo, ImgInfo, NodeInfo, InfoResponse, UiOptions} from '../lib';
 import {capitalizeWords} from '../util';
 
 export default defineComponent({
@@ -111,7 +112,7 @@ export default defineComponent({
 				width: this.lytOpts.maxTileSz + 'px',
 				height: this.lytOpts.maxTileSz + 'px',
 				backgroundImage: imgName != null ?
-					'url(\'/img/' + imgName.replaceAll('\'', '\\\'') + '\')' :
+					`url('${getImagePath(imgName as string)}')` :
 					'none',
 				backgroundColor: this.uiOpts.bgColorDark,
 				backgroundSize: 'cover',
-- 
cgit v1.2.3

