Improved range track click position and actor height range.

This commit is contained in:
DebaucheryLibrarian 2021-03-03 19:29:40 +01:00
parent 2cda689b3c
commit 6742bf7d48
2 changed files with 3 additions and 3 deletions

View File

@ -159,7 +159,7 @@
<span class="filter-split"> <span class="filter-split">
<Range <Range
:min="50" :min="50"
:max="250" :max="220"
:value="height" :value="height"
:disabled="!heightRequired" :disabled="!heightRequired"
:allow-enable="true" :allow-enable="true"
@ -326,7 +326,7 @@ export default {
boobSize: this.$route.query.bs?.split(',') || ['A', 'Z'], boobSize: this.$route.query.bs?.split(',') || ['A', 'Z'],
boobSizeRequired: !!this.$route.query.bs, boobSizeRequired: !!this.$route.query.bs,
naturalBoobs: naturalBoobs > -1 ? naturalBoobs : 1, naturalBoobs: naturalBoobs > -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, heightRequired: !!this.$route.query.h,
weight: this.$route.query.w?.split(',').map(Number) || [30, 200], weight: this.$route.query.w?.split(',').map(Number) || [30, 200],
weightRequired: !!this.$route.query.w, weightRequired: !!this.$route.query.w,

View File

@ -86,7 +86,7 @@ function setNearest(event) {
nextTick(() => { nextTick(() => {
if (!this.disabled) { 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'; const closestSlider = Math.abs(this.valueA - closestValue) < Math.abs(this.valueB - closestValue) ? 'valueA' : 'valueB';
this[closestSlider] = closestValue; this[closestSlider] = closestValue;