Skip to content

Commit 3a30178

Browse files
committed
Skip COG preview if unavailable
1 parent 5ab755a commit 3a30178

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

src/components/Item.vue

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@
2323
<div class="col-md-8">
2424
<b-tabs>
2525
<b-tab
26-
v-if="cog"
26+
v-if="cog != null"
2727
title="Preview"
28-
active
28+
:active="cog != null"
2929
>
3030
<div
3131
id="map-container"
@@ -36,6 +36,7 @@
3636
<b-tab
3737
v-if="thumbnail"
3838
title="Thumbnail"
39+
:active="cog == null && thumbnail != null"
3940
>
4041
<a :href="thumbnail">
4142
<img
@@ -48,6 +49,7 @@
4849
<b-tab
4950
v-if="assets.length > 0"
5051
title="Assets"
52+
:active="cog == null && thumbnail == null"
5153
>
5254
<div class="table-responsive assets">
5355
<table class="table">
@@ -407,7 +409,9 @@ export default {
407409
methods: {
408410
...mapActions(["load"]),
409411
initialize() {
410-
this.initializePreviewMap();
412+
if (this.cog != null) {
413+
this.initializePreviewMap();
414+
}
411415
this.initializeLocatorMap();
412416
},
413417
initializeLocatorMap() {
@@ -649,6 +653,10 @@ code {
649653
z-index: 99999;
650654
}
651655
656+
.leaflet-container {
657+
background-color: #262626;
658+
}
659+
652660
#locator-map {
653661
height: 200px;
654662
width: 100%;

0 commit comments

Comments
 (0)