From 6742bf7d4857ecf7ee3716639b88bc681eaef48f Mon Sep 17 00:00:00 2001 From: DebaucheryLibrarian Date: Wed, 3 Mar 2021 19:29:40 +0100 Subject: [PATCH] Improved range track click position and actor height range. --- assets/components/actors/actors.vue | 4 ++-- assets/components/form/range.vue | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/assets/components/actors/actors.vue b/assets/components/actors/actors.vue index f3ada632..cffcd17d 100644 --- a/assets/components/actors/actors.vue +++ b/assets/components/actors/actors.vue @@ -159,7 +159,7 @@ -1 ? naturalBoobs : 1, - height: this.$route.query.h?.split(',').map(Number) || [50, 250], + height: this.$route.query.h?.split(',').map(Number) || [50, 220], heightRequired: !!this.$route.query.h, weight: this.$route.query.w?.split(',').map(Number) || [30, 200], weightRequired: !!this.$route.query.w, diff --git a/assets/components/form/range.vue b/assets/components/form/range.vue index ffba65ea..e02ea9aa 100644 --- a/assets/components/form/range.vue +++ b/assets/components/form/range.vue @@ -86,7 +86,7 @@ function setNearest(event) { nextTick(() => { if (!this.disabled) { - const closestValue = Math.ceil((event.offsetX / event.target.getBoundingClientRect().width) * (this.max - this.min)) + this.min; + const closestValue = Math.round((event.offsetX / event.target.getBoundingClientRect().width) * (this.max - this.min)) + this.min; const closestSlider = Math.abs(this.valueA - closestValue) < Math.abs(this.valueB - closestValue) ? 'valueA' : 'valueB'; this[closestSlider] = closestValue;