From c19251c6a1a001c96396c55e1a33a5fd1f0cbfe0 Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Mon, 8 Jul 2019 00:16:43 +0200 Subject: [PATCH] Always reset carousel image width to auto before re-adjusting the size --- .../backend/http/static/js/widgets/image-carousel/index.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/platypush/backend/http/static/js/widgets/image-carousel/index.js b/platypush/backend/http/static/js/widgets/image-carousel/index.js index bb4e321b7..f7e4e991c 100644 --- a/platypush/backend/http/static/js/widgets/image-carousel/index.js +++ b/platypush/backend/http/static/js/widgets/image-carousel/index.js @@ -25,10 +25,9 @@ Vue.component('image-carousel', { onNewImage: function() { this.$refs.background.style['background-image'] = 'url(' + this.currentImage + ')'; + this.$refs.img.style.width = 'auto'; if (this.$refs.img.width > this.$refs.img.height) { - this.$refs.img.style.width = 'auto'; - if ((this.$refs.img.width / this.$refs.img.height) >= 1.25) { this.$refs.img.style.width = '100%'; }