From e5272d224383d9afdc183dfc626937ba87fc27cf Mon Sep 17 00:00:00 2001 From: Gauthier Roebroeck Date: Thu, 30 Jul 2020 20:18:30 +0800 Subject: [PATCH] fix(webreader): cycle image fit would not persist setting --- komga-webui/src/views/BookReader.vue | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/komga-webui/src/views/BookReader.vue b/komga-webui/src/views/BookReader.vue index 258ccbf5c..28f930a2a 100644 --- a/komga-webui/src/views/BookReader.vue +++ b/komga-webui/src/views/BookReader.vue @@ -671,10 +671,10 @@ export default Vue.extend({ this.sendNotification(`Changing Reading Direction to: ${text}`) }, cycleScale () { - let fit: ImageFit = this.settings.fit - let i = (this.settings.imageFits.indexOf(fit) + 1) % (this.settings.imageFits.length) - this.settings.fit = this.settings.imageFits[i] - let text = this.imageFits[i].text + const fit: ImageFit = this.settings.fit + const i = (this.settings.imageFits.indexOf(fit) + 1) % (this.settings.imageFits.length) + this.imageFit = this.settings.imageFits[i] + const text = this.imageFits[i].text // The text here only works cause this.imageFits has the same index structure as the ImageFit enum this.sendNotification(`Cycling Scale: ${text}`) },