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

@@ -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;