forked from DebaucheryLibrarian/traxxx
Improved range track click position and actor height range.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user