Permalink
Browse files

Merge pull request #186 from andreruffert/release/v2.0.4

release: v2.0.4
  • Loading branch information...
andreruffert committed Nov 15, 2015
2 parents 9c1b171 + d7a5de4 commit 147ee11bf5c6db96cbf7ba3d84a843a9efaef874
Showing with 10 additions and 18 deletions.
  1. +1 −1 bower.json
  2. +3 −7 dist/rangeslider.js
  3. +2 −2 dist/rangeslider.min.js
  4. +2 −2 package.json
  5. +2 −6 src/rangeslider.js
View
@@ -1,6 +1,6 @@
{
"name": "rangeslider.js",
"version": "2.0.3",
"version": "2.0.4",
"homepage": "https://github.com/andreruffert/rangeslider.js",
"authors": [
"André Ruffert <andre@andreruffert.com>"
View
@@ -1,4 +1,4 @@
/*! rangeslider.js - v2.0.3 | (c) 2015 @andreruffert | MIT license | https://github.com/andreruffert/rangeslider.js */
/*! rangeslider.js - v2.0.4 | (c) 2015 @andreruffert | MIT license | https://github.com/andreruffert/rangeslider.js */
(function(factory) {
'use strict';
@@ -279,10 +279,6 @@
Plugin.prototype.init = function() {
this.update(true, false);
// Set initial value just in case it is not set already.
// Prevents trouble if we call `update(true)`
this.$element[0].value = this.value;
if (this.onInit && typeof this.onInit === 'function') {
this.onInit();
}
@@ -294,7 +290,7 @@
if (updateAttributes) {
this.min = tryParseFloat(this.$element[0].getAttribute('min'), 0);
this.max = tryParseFloat(this.$element[0].getAttribute('max'), 100);
this.value = tryParseFloat(this.$element[0].value, this.min + (this.max-this.min)/2);
this.value = tryParseFloat(this.$element[0].value, Math.round(this.min + (this.max-this.min)/2));
this.step = tryParseFloat(this.$element[0].getAttribute('step'), 1);
}
@@ -433,7 +429,7 @@
};
Plugin.prototype.setValue = function(value) {
if (value === this.value) {
if (value === this.value && this.$element[0].value !== '') {
return;
}
View

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
View
@@ -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.3",
"codename": "Razzmatazz",
"version": "2.0.4",
"codename": "Salmon",
"main": "dist/rangeslider.js",
"homepage": "https://github.com/andreruffert/rangeslider.js",
"author": {
View
@@ -278,10 +278,6 @@
Plugin.prototype.init = function() {
this.update(true, false);
// Set initial value just in case it is not set already.
// Prevents trouble if we call `update(true)`
this.$element[0].value = this.value;
if (this.onInit && typeof this.onInit === 'function') {
this.onInit();
}
@@ -293,7 +289,7 @@
if (updateAttributes) {
this.min = tryParseFloat(this.$element[0].getAttribute('min'), 0);
this.max = tryParseFloat(this.$element[0].getAttribute('max'), 100);
this.value = tryParseFloat(this.$element[0].value, this.min + (this.max-this.min)/2);
this.value = tryParseFloat(this.$element[0].value, Math.round(this.min + (this.max-this.min)/2));
this.step = tryParseFloat(this.$element[0].getAttribute('step'), 1);
}
@@ -432,7 +428,7 @@
};
Plugin.prototype.setValue = function(value) {
if (value === this.value) {
if (value === this.value && this.$element[0].value !== '') {
return;
}

0 comments on commit 147ee11

Please sign in to comment.