Skip to content
This repository has been archived by the owner on May 30, 2024. It is now read-only.

Commit

Permalink
Merge pull request #186 from andreruffert/release/v2.0.4
Browse files Browse the repository at this point in the history
release: v2.0.4
  • Loading branch information
andreruffert committed Nov 15, 2015
2 parents 9c1b171 + d7a5de4 commit 147ee11
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 18 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -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 <[email protected]>"
Expand Down
10 changes: 3 additions & 7 deletions dist/rangeslider.js
Original file line number Diff line number Diff line change
@@ -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';

Expand Down Expand Up @@ -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();
}
Expand All @@ -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);
}

Expand Down Expand Up @@ -433,7 +429,7 @@
};

Plugin.prototype.setValue = function(value) {
if (value === this.value) {
if (value === this.value && this.$element[0].value !== '') {
return;
}

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.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
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.3",
"codename": "Razzmatazz",
"version": "2.0.4",
"codename": "Salmon",
"main": "dist/rangeslider.js",
"homepage": "https://github.com/andreruffert/rangeslider.js",
"author": {
Expand Down
8 changes: 2 additions & 6 deletions src/rangeslider.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand All @@ -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);
}

Expand Down Expand Up @@ -432,7 +428,7 @@
};

Plugin.prototype.setValue = function(value) {
if (value === this.value) {
if (value === this.value && this.$element[0].value !== '') {
return;
}

Expand Down

0 comments on commit 147ee11

Please sign in to comment.