]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
updates slider to prevent overflow from right hand handle, broken for 2-handled verti...
authorChris Oyler <chris@zurb.com>
Tue, 5 Jan 2016 22:27:12 +0000 (14:27 -0800)
committerChris Oyler <chris@zurb.com>
Tue, 5 Jan 2016 22:27:12 +0000 (14:27 -0800)
js/foundation.slider.js

index e79ed0e0adf0077f00b4b6ca0cbc7c73d5de0d16..315119e92cfb1eec63ae5cf163d2fd263ffaddaf 100644 (file)
         // css['min-' + hOrW] = dim + '%';
         if(cb && typeof cb === 'function'){ cb(); }
       }else{
-        var handleLeft = parseFloat(this.$handle[0].style.left);
+        var handlePos = parseFloat(this.$handle[0].style[lOrT]);
         //further revised
-        var thing = movement - (parseFloat(this.$handle[0].style[lOrT]) || this.options.initialStart) + halfOfHandle;
-        location = (location - ((!isNaN(handleLeft) ? handleLeft : this.options.end - location)));
+        var thing = movement - (isNaN(handlePos) ? this.options.initialStart : handlePos) + halfOfHandle;
+        // location = (location - ((!isNaN(handleLeft) ? handleLeft : this.options.end - location)));
         console.log('test',movement, halfOfHandle, thing);
         // movement += halfOfHandle;
         // revised edition