Improved range track click position and actor height range.
This commit is contained in:
parent
2cda689b3c
commit
6742bf7d48
|
@ -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,
|
||||||
|
|
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue