From: koki-higashikawa Date: Thu, 6 Jul 2017 11:19:37 +0000 (+0900) Subject: Fixed #10284 X-Git-Tag: v6.4.2-rc2~1^2~29^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F10355%2Fhead;p=thirdparty%2Ffoundation%2Ffoundation-sites.git Fixed #10284 Before calculating the boundary values of the two handlers, it was necessary to calculate the vertical position. --- 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',