Skip to content

Commit

Permalink
Merge pull request #172 from andreruffert/release/v2.0.1
Browse files Browse the repository at this point in the history
Release: v2.0.1
  • Loading branch information
andreruffert committed Sep 10, 2015
2 parents 084f38e + 0707117 commit 64b8744
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 13 deletions.
2 changes: 1 addition & 1 deletion bower.json
@@ -1,6 +1,6 @@
{
"name": "rangeslider.js",
"version": "2.0.0",
"version": "2.0.1",
"homepage": "https://github.com/andreruffert/rangeslider.js",
"authors": [
"André Ruffert <andre@andreruffert.com>"
Expand Down
6 changes: 3 additions & 3 deletions dist/rangeslider.js
@@ -1,4 +1,4 @@
/*! rangeslider.js - v2.0.0 | (c) 2015 @andreruffert | MIT license | https://github.com/andreruffert/rangeslider.js */
/*! rangeslider.js - v2.0.1 | (c) 2015 @andreruffert | MIT license | https://github.com/andreruffert/rangeslider.js */
(function(factory) {
'use strict';

Expand Down Expand Up @@ -438,8 +438,8 @@

Plugin.prototype.getPositionFromValue = function(value) {
var percentage, pos;
percentage = value && (value - this.min)/(this.max - this.min);
pos = percentage * this.maxHandlePos;
percentage = (value - this.min)/(this.max - this.min);
pos = (!Number.isNaN(percentage)) ? percentage * this.maxHandlePos : 0;
return pos;
};

Expand Down
4 changes: 2 additions & 2 deletions dist/rangeslider.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 8 additions & 2 deletions example/index.html
Expand Up @@ -70,8 +70,14 @@ <h2>Comparison to native element</h2>

<div>
<h2>Negative attributes</h2>
<input type="range" min="-20" max="20" data-rangeslider>
<output></output>
<div>
<input type="range" min="-10" max="0" data-rangeslider>
<output></output>
</div>
<div>
<input type="range" min="-20" max="20" value="-10" data-rangeslider>
<output></output>
</div>
</div>

<br>
Expand Down
6 changes: 3 additions & 3 deletions package.json
Expand Up @@ -2,8 +2,8 @@
"name": "rangeslider.js",
"title": "rangeslider.js",
"description": "Simple, small and fast JavaScript/jQuery polyfill for the HTML5 <input type=\"range\"> slider element",
"version": "2.0.0",
"codename": "Atomic Tangerine",
"version": "2.0.1",
"codename": "Lemon Yellow",
"main": "dist/rangeslider.js",
"homepage": "https://github.com/andreruffert/rangeslider.js",
"author": {
Expand Down Expand Up @@ -62,4 +62,4 @@
"files": [
"dist"
]
}
}
4 changes: 2 additions & 2 deletions src/rangeslider.js
Expand Up @@ -437,8 +437,8 @@

Plugin.prototype.getPositionFromValue = function(value) {
var percentage, pos;
percentage = value && (value - this.min)/(this.max - this.min);
pos = percentage * this.maxHandlePos;
percentage = (value - this.min)/(this.max - this.min);
pos = (!Number.isNaN(percentage)) ? percentage * this.maxHandlePos : 0;
return pos;
};

Expand Down

0 comments on commit 64b8744

Please sign in to comment.