]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
Fixed #10284 10355/head
authorkoki-higashikawa <koki.higashikawa@crowdworks.co.jp>
Thu, 6 Jul 2017 11:19:37 +0000 (20:19 +0900)
committerkoki-higashikawa <koki.higashikawa@crowdworks.co.jp>
Thu, 6 Jul 2017 11:32:22 +0000 (20:32 +0900)
Before calculating the boundary values of the two handlers,
it was necessary to calculate the vertical position.

js/foundation.slider.js

index 9d6cd9d76b3b5bc9605444a107324660bcb12b99..d2ca364b383f1bd13ac1e8b5927426c4ccebd595 100644 (file)
@@ -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',