From 9c4db9d0f9ee5b17147317989326ae2fa05489e5 Mon Sep 17 00:00:00 2001 From: ManjaroOne666 Date: Sun, 27 Jan 2019 13:34:32 +0000 Subject: [PATCH] updates --- components/BackgroundImagePreloader.vue | 13 +++++++------ components/GalleryFeatured.vue | 2 ++ components/GalleryThumbs.vue | 2 ++ pages/services.vue | 4 ---- 4 files changed, 11 insertions(+), 10 deletions(-) diff --git a/components/BackgroundImagePreloader.vue b/components/BackgroundImagePreloader.vue index 2901fab..94709dc 100644 --- a/components/BackgroundImagePreloader.vue +++ b/components/BackgroundImagePreloader.vue @@ -43,7 +43,9 @@ export default { mounted () { if (this.imageUrls.length > 1) { - this.preloadImage() + setTimeout(() => { + this.preloadImage() + }, 100) // timeout so events get fired - don't know why that is yet TODO - investigate properly } }, @@ -51,8 +53,7 @@ export default { preloadImage () { this.loadImage(this.imageUrls[this.currentlyLoadingIndex]) .then(img => { - this.$emit('imageLoaded', img.src) - console.log('imageloaded', img) + this.$emit('imageLoaded', img) this.currentlyLoadingIndex++ if (this.currentlyLoadingIndex < this.imageUrls.length) { this.preloadImage() @@ -60,12 +61,12 @@ export default { }) .catch(err => { // TODO handle error cases - console.log('imageloaded ERROR', img.src) + console.log('imageloaded ERROR', err) }) }, - handleImageLoaded (img) { - this.$emit('imageLoaded handler', img.src) + handleImageLoaded () { + this.$emit('imageLoaded', this.imageUrls[this.activeIndex]) } } } diff --git a/components/GalleryFeatured.vue b/components/GalleryFeatured.vue index 79dfcf5..668deac 100644 --- a/components/GalleryFeatured.vue +++ b/components/GalleryFeatured.vue @@ -55,6 +55,8 @@ export default { .gallery-featured { transition: opacity .3s; // TEMP padding: 8px; + + cursor: pointer; } .featured-image { diff --git a/components/GalleryThumbs.vue b/components/GalleryThumbs.vue index d7155ec..27b03f7 100644 --- a/components/GalleryThumbs.vue +++ b/components/GalleryThumbs.vue @@ -234,6 +234,8 @@ export default { padding: 0 2px; background-clip: content-box; + + cursor: pointer; } @media (max-width: $bp__layout) { diff --git a/pages/services.vue b/pages/services.vue index ac4d9de..4a3abe5 100644 --- a/pages/services.vue +++ b/pages/services.vue @@ -88,10 +88,6 @@ export default { methods: { handleMouseOver(index) { - // TOOD this needs to only change if the transition has finished - // need to emit transitionend events on the background loaders - // and listen for them. - // if waiting for an transitionend event ignore the mouseover event this.activeIndex = index }, },