| Index: lib/src/iron-range-behavior/iron-range-behavior.html
|
| diff --git a/lib/src/iron-range-behavior/iron-range-behavior.html b/lib/src/iron-range-behavior/iron-range-behavior.html
|
| index 4306e6924e51134aca979cc5ecd7bdd04e956b1e..28469e9eaeb15a06e3e363d8c27e415b14de9648 100644
|
| --- a/lib/src/iron-range-behavior/iron-range-behavior.html
|
| +++ b/lib/src/iron-range-behavior/iron-range-behavior.html
|
| @@ -12,11 +12,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
| <script>
|
|
|
| - /**
|
| + /**
|
| * `iron-range-behavior` provides the behavior for something with a minimum to maximum range.
|
| *
|
| * @demo demo/index.html
|
| - * @polymerBehavior
|
| + * @polymerBehavior
|
| */
|
| Polymer.IronRangeBehavior = {
|
|
|
| @@ -85,13 +85,16 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
| _calcStep: function(value) {
|
| /**
|
| * if we calculate the step using
|
| - * `Math.round(value / step) * step` we may hit a precision point issue
|
| + * `Math.round(value / step) * step` we may hit a precision point issue
|
| * eg. 0.1 * 0.2 = 0.020000000000000004
|
| * http://docs.oracle.com/cd/E19957-01/806-3568/ncg_goldberg.html
|
| *
|
| * as a work around we can divide by the reciprocal of `step`
|
| */
|
| - return this.step ? (Math.round(value / this.step) / (1 / this.step)) : value;
|
| + // polymer/issues/2493
|
| + value = parseFloat(value);
|
| + return this.step ? (Math.round((value + this.min) / this.step) -
|
| + (this.min / this.step)) / (1 / this.step) : value;
|
| },
|
|
|
| _validateValue: function() {
|
|
|