From ca0043ab8bab11f8b374a3470f2bfa6c4171de2f Mon Sep 17 00:00:00 2001 From: koki-higashikawa Date: Thu, 6 Jul 2017 20:19:37 +0900 Subject: [PATCH] Fixed #10284 Before calculating the boundary values of the two handlers, it was necessary to calculate the vertical position. --- js/foundation.slider.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/js/foundation.slider.js b/js/foundation.slider.js index 9d6cd9d76..d2ca364b3 100644 --- a/js/foundation.slider.js +++ b/js/foundation.slider.js @@ -200,6 +200,12 @@ class Slider extends Plugin { var isDbl = this.options.doubleSided; + //this is for single-handled vertical sliders, it adjusts the value to account for the slider being "upside-down" + //for click and drag events, it's weird due to the scale(-1, 1) css property + if (this.options.vertical && !noInvert) { + location = this.options.end - location; + } + if (isDbl) { //this block is to prevent 2 handles from crossing eachother. Could/should be improved. if (this.handles.index($hndl) === 0) { var h2Val = parseFloat(this.$handle2.attr('aria-valuenow')); @@ -210,12 +216,6 @@ class Slider extends Plugin { } } - //this is for single-handled vertical sliders, it adjusts the value to account for the slider being "upside-down" - //for click and drag events, it's weird due to the scale(-1, 1) css property - if (this.options.vertical && !noInvert) { - location = this.options.end - location; - } - var _this = this, vert = this.options.vertical, hOrW = vert ? 'height' : 'width', -- 2.47.2