Skip to content
Snippets Groups Projects
Commit 4f396db5 authored by xaralis's avatar xaralis
Browse files

feat(maps_utils): preload map collection images

parent 4caf90d5
Branches
No related tags found
2 merge requests!536Release,!533Preload map collection images upfront, more content options for map collection, allow aligning button, new generic headline block
...@@ -236,6 +236,14 @@ const GeoFeatureCollection = Vue.component("GeoFeatureCollection", { ...@@ -236,6 +236,14 @@ const GeoFeatureCollection = Vue.component("GeoFeatureCollection", {
}); });
} }
// Preload images
annotatedFeatures.forEach((feature) => {
if (feature.properties.image) {
const i = new Image();
i.src = feature.properties.image;
}
});
// Draw the map. // Draw the map.
this.initMap({ this.initMap({
type: "FeatureCollection", type: "FeatureCollection",
...@@ -651,7 +659,12 @@ const GeoFeatureCollection = Vue.component("GeoFeatureCollection", { ...@@ -651,7 +659,12 @@ const GeoFeatureCollection = Vue.component("GeoFeatureCollection", {
{{ currentItem.description }} {{ currentItem.description }}
</div> </div>
<a v-if="currentItem.link" :href="currentItem.link" class="mt-4 text-sm btn btn--grey-125 btn--hoveractive"><div class="btn__body">Zjistit více</div></a> <a v-if="currentItem.link" :href="currentItem.link" class="mt-4 text-sm btn btn--black btn--icon">
<div class="btn__body-wrap">
<div class="btn__body">Zjistit více</div>
<div class="btn__icon"><i class="ico--chevron-right"></i></div>
</div>
</a>
</div> </div>
</div> </div>
</div> </div>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment