From 8e06b8c7277ae099f88f4af1dc89a9c49ba88718 Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Sat, 30 Apr 2022 23:40:14 +0200 Subject: [PATCH] Fixed range scaling on Slider component --- .../backend/http/webapp/src/components/elements/Slider.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platypush/backend/http/webapp/src/components/elements/Slider.vue b/platypush/backend/http/webapp/src/components/elements/Slider.vue index 8cf7393e9..9969db470 100644 --- a/platypush/backend/http/webapp/src/components/elements/Slider.vue +++ b/platypush/backend/http/webapp/src/components/elements/Slider.vue @@ -62,7 +62,7 @@ export default { }, update(value) { - const percent = (value * 100) / (this.range[1] - this.range[0]) + const percent = ((value - this.range[0]) * 100) / (this.range[1] - this.range[0]) this.$refs.thumb.style.left = `${percent}%` this.$refs.thumb.style.transform = `translate(-${percent}%, -50%)` this.$refs.track.style.width = `${percent}%`