aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTerry Truong <terry06890@gmail.com>2022-05-24 13:12:36 +1000
committerTerry Truong <terry06890@gmail.com>2022-05-24 13:12:36 +1000
commitc5101c0e34ba8db5aeb009f3a17c82fdaeb869ae (patch)
treef3bf2bda5b287e223aa85f066e8eaf979c11c66d
parent5b3fcc397cf87ef4f484a01e3fc00f4e18b6f6da (diff)
Don't show blank image in info-modal for for compound-image with only 1 sub-image
-rw-r--r--src/components/TileInfoModal.vue4
-rw-r--r--src/tol.ts2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/components/TileInfoModal.vue b/src/components/TileInfoModal.vue
index 55d95b4..1123387 100644
--- a/src/components/TileInfoModal.vue
+++ b/src/components/TileInfoModal.vue
@@ -139,13 +139,13 @@ export default defineComponent({
</ul>
</div>
<div v-else>
- <div :style="firstImgStyles"/>
+ <div v-if="tolNode.imgName[0] != null" :style="firstImgStyles"/>
<ul v-if="imgInfo1 != null">
<li>License: {{imgInfo1.license}}</li>
<li><a :href="imgInfo1.sourceUrl" class="underline">Source URL</a></li>
<li>Copyright Owner: {{imgInfo1.copyrightOwner}}</li>
</ul>
- <div :style="secondImgStyles"/>
+ <div v-if="tolNode.imgName[1] != null" :style="secondImgStyles"/>
<ul v-if="imgInfo2 != null">
<li>License: {{imgInfo2.license}}</li>
<li><a :href="imgInfo2.sourceUrl" class="underline">Source URL</a></li>
diff --git a/src/tol.ts b/src/tol.ts
index 15f1a94..aa9a9b1 100644
--- a/src/tol.ts
+++ b/src/tol.ts
@@ -11,7 +11,7 @@ export class TolNode {
tips: number;
pSupport: boolean;
commonName: null | string;
- imgName: null | string | [string, string];
+ imgName: null | string | [string, string] | [null, string] | [string, null];
constructor(children: string[] = [], parent = null, tips = 0, pSupport = false){
this.children = children;
this.parent = parent;