Skip to content

Commit

Permalink
Update to 2.0.11
Browse files Browse the repository at this point in the history
  • Loading branch information
IonDen committed Jul 2, 2015
1 parent 91db142 commit 88b4ae8
Show file tree
Hide file tree
Showing 9 changed files with 56 additions and 47 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ion.rangeSlider",
"version": "2.0.10",
"version": "2.0.11",
"homepage": "https://github.com/IonDen/ion.rangeSlider",
"authors": [
{
Expand Down
3 changes: 3 additions & 0 deletions history.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Ion.RangeSlider Update History

### Version 2.0.11. July 02, 2015
* Fixed more bugs. Issues: #247, #253

### Version 2.0.10. June 06, 2015
* Fixed rounding bug. Issue #247

Expand Down
4 changes: 2 additions & 2 deletions index.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Ion.Range Slider 2.0.10
# Ion.Range Slider 2.0.11

> English description | <a href="readme.ru.md">Описание на русском</a>
Easy, flexible and responsive range slider
* <a href="http://ionden.com/a/plugins/ion.rangeSlider/en.html">Project page and demos</a>
* <a href="http://ionden.com/a/plugins/ion.rangeSlider/ion.rangeSlider-2.0.10.zip">Download ion.rangeSlider-2.0.10.zip</a>
* <a href="http://ionden.com/a/plugins/ion.rangeSlider/ion.rangeSlider-2.0.11.zip">Download ion.rangeSlider-2.0.11.zip</a>

***

Expand Down
4 changes: 2 additions & 2 deletions ion-rangeSlider.jquery.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ion-rangeSlider",
"version": "2.0.10",
"version": "2.0.11",
"title": "Ion.RangeSlider",
"description": "Cool, comfortable and easily customizable range slider with many options and skin support",
"keywords": [
Expand Down Expand Up @@ -30,7 +30,7 @@
"homepage": "https://github.com/IonDen/ion.rangeSlider",
"docs": "https://github.com/IonDen/ion.rangeSlider/blob/master/readme.md",
"demo": "http://ionden.com/a/plugins/ion.rangeSlider/en.html",
"download": "http://ionden.com/a/plugins/ion.rangeSlider/ion.rangeSlider-2.0.10.zip",
"download": "http://ionden.com/a/plugins/ion.rangeSlider/ion.rangeSlider-2.0.11.zip",
"dependencies": {
"jquery": ">=1.8"
}
Expand Down
35 changes: 20 additions & 15 deletions js/ion.rangeSlider.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Ion.RangeSlider
// version 2.0.10 Build: 323
// version 2.0.11 Build: 327
// © Denis Ineshin, 2015
// https://github.com/IonDen
//
Expand Down Expand Up @@ -138,7 +138,7 @@
// Core

var IonRangeSlider = function (input, options, plugin_count) {
this.VERSION = "2.0.10";
this.VERSION = "2.0.11";
this.input = input;
this.plugin_count = plugin_count;
this.current_plugin = 0;
Expand Down Expand Up @@ -1226,8 +1226,8 @@

if (o.type === "single") {
if (o.from_shadow && (is_from_min || is_from_max)) {
from_min = this.calcPercent(o.from_min || o.min);
from_max = this.calcPercent(o.from_max || o.max) - from_min;
from_min = this.calcPercent(is_from_min ? o.from_min : o.min);
from_max = this.calcPercent(is_from_max ? o.from_max : o.max) - from_min;
from_min = this.toFixed(from_min - (this.coords.p_handle / 100 * from_min));
from_max = this.toFixed(from_max - (this.coords.p_handle / 100 * from_max));
from_min = from_min + (this.coords.p_handle / 2);
Expand All @@ -1240,8 +1240,8 @@
}
} else {
if (o.from_shadow && (is_from_min || is_from_max)) {
from_min = this.calcPercent(o.from_min || o.min);
from_max = this.calcPercent(o.from_max || o.max) - from_min;
from_min = this.calcPercent(is_from_min ? o.from_min : o.min);
from_max = this.calcPercent(is_from_max ? o.from_max : o.max) - from_min;
from_min = this.toFixed(from_min - (this.coords.p_handle / 100 * from_min));
from_max = this.toFixed(from_max - (this.coords.p_handle / 100 * from_max));
from_min = from_min + (this.coords.p_handle / 2);
Expand All @@ -1254,8 +1254,8 @@
}

if (o.to_shadow && (is_to_min || is_to_max)) {
to_min = this.calcPercent(o.to_min || o.min);
to_max = this.calcPercent(o.to_max || o.max) - to_min;
to_min = this.calcPercent(is_to_min ? o.to_min : o.min);
to_max = this.calcPercent(is_to_max ? o.to_max : o.max) - to_min;
to_min = this.toFixed(to_min - (this.coords.p_handle / 100 * to_min));
to_max = this.toFixed(to_max - (this.coords.p_handle / 100 * to_max));
to_min = to_min + (this.coords.p_handle / 2);
Expand Down Expand Up @@ -1325,7 +1325,12 @@
} else {
number = number / this.options.step;
number = number * this.options.step;
number = +number.toFixed(0);

if (number !== min && number !== max) {
number = +number.toFixed(0);
} else {
number = +number.toFixed(avg_decimals);
}
}

if (abs) {
Expand Down Expand Up @@ -1428,11 +1433,11 @@
var num = this.calcReal(p_num),
o = this.options;

if (!min || typeof min !== "number") {
if (typeof min !== "number") {
min = o.min;
}

if (!max || typeof max !== "number") {
if (typeof max !== "number") {
max = o.max;
}

Expand Down Expand Up @@ -1577,19 +1582,19 @@
o.keyboard_step = 5;
}

if (o.from_min && o.from < o.from_min) {
if (typeof o.from_min === "number" && o.from < o.from_min) {
o.from = o.from_min;
}

if (o.from_max && o.from > o.from_max) {
if (typeof o.from_max === "number" && o.from > o.from_max) {
o.from = o.from_max;
}

if (o.to_min && o.to < o.to_min) {
if (typeof o.to_min === "number" && o.to < o.to_min) {
o.to = o.to_min;
}

if (o.to_max && o.from > o.to_max) {
if (typeof o.to_max === "number" && o.from > o.to_max) {
o.to = o.to_max;
}

Expand Down
Loading

0 comments on commit 88b4ae8

Please sign in to comment.