From 5cb90a725a78dbabe5e3fd98cecc1ebb56da5129 Mon Sep 17 00:00:00 2001 From: IonDen Date: Tue, 17 Feb 2015 23:47:47 +0300 Subject: [PATCH] Update to 2.0.6 --- bower.json | 2 +- history.md | 6 ++++- index.md | 4 +-- ion-rangeSlider.jquery.json | 4 +-- js/ion.rangeSlider.js | 53 ++++++++++++++++++++++++++++++------- js/ion.rangeSlider.min.js | 41 ++++++++++++++-------------- package.json | 2 +- readme.md | 4 +-- readme.ru.md | 4 +-- 9 files changed, 80 insertions(+), 40 deletions(-) diff --git a/bower.json b/bower.json index f954bd2..c509712 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "ion.rangeSlider", - "version": "2.0.5", + "version": "2.0.6", "homepage": "https://github.com/IonDen/ion.rangeSlider", "authors": [ { diff --git a/history.md b/history.md index 90e3ab7..cfe0d84 100644 --- a/history.md +++ b/history.md @@ -1,7 +1,11 @@ # Ion.RangeSlider Update History +### Version 2.0.6. February 17, 2015 +* Issues done: #197 +* Fixed bug with broken From and To + ### Version 2.0.5. February 13, 2015 -* Issues done: #193, #195, #197, #201 +* Issues done: #193, #195, #201 ### Version 2.0.4. February 12, 2015 * Issues done: #174, #184 diff --git a/index.md b/index.md index 19be7e1..19c616e 100644 --- a/index.md +++ b/index.md @@ -1,10 +1,10 @@ -# Ion.Range Slider 2.0.5 +# Ion.Range Slider 2.0.6 > English description | Описание на русском Easy and light range slider * Project page and demos -* Download ion.rangeSlider-2.0.5.zip +* Download ion.rangeSlider-2.0.6.zip *** diff --git a/ion-rangeSlider.jquery.json b/ion-rangeSlider.jquery.json index 7c02bf3..72567fc 100644 --- a/ion-rangeSlider.jquery.json +++ b/ion-rangeSlider.jquery.json @@ -1,6 +1,6 @@ { "name": "ion-rangeSlider", - "version": "2.0.5", + "version": "2.0.6", "title": "Ion.RangeSlider", "description": "Cool, comfortable and easily customizable range slider with many options and skin support", "keywords": [ @@ -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.5.zip", + "download": "http://ionden.com/a/plugins/ion.rangeSlider/ion.rangeSlider-2.0.6.zip", "dependencies": { "jquery": ">=1.8" } diff --git a/js/ion.rangeSlider.js b/js/ion.rangeSlider.js index dffb948..c52ac92 100644 --- a/js/ion.rangeSlider.js +++ b/js/ion.rangeSlider.js @@ -1,5 +1,5 @@ // Ion.RangeSlider -// version 2.0.5 Build: 298 +// version 2.0.6 Build: 300 // © Denis Ineshin, 2015 // https://github.com/IonDen // @@ -76,6 +76,34 @@ return bound; }; } + if (!Array.prototype.indexOf) { + Array.prototype.indexOf = function(searchElement, fromIndex) { + var k; + if (this == null) { + throw new TypeError('"this" is null or not defined'); + } + var O = Object(this); + var len = O.length >>> 0; + if (len === 0) { + return -1; + } + var n = +fromIndex || 0; + if (Math.abs(n) === Infinity) { + n = 0; + } + if (n >= len) { + return -1; + } + k = Math.max(n >= 0 ? n : len - Math.abs(n), 0); + while (k < len) { + if (k in O && O[k] === searchElement) { + return k; + } + k++; + } + return -1; + }; + } @@ -111,7 +139,7 @@ // Core var IonRangeSlider = function (input, options, plugin_count) { - this.VERSION = "2.0.5"; + this.VERSION = "2.0.6"; this.input = input; this.plugin_count = plugin_count; this.current_plugin = 0; @@ -209,14 +237,21 @@ var val = $inp.prop("value"); if (val) { val = val.split(";"); - } - if (val && options.values && options.values.length) { - data.from = val[0] && options.values.indexOf(val[0]); - data.to = val[1] && options.values.indexOf(val[1]); - } else { - data.from = val[0] && +val[0]; - data.to = val[1] && +val[1]; + if (val[0] && val[0] == +val[0]) { + val[0] = +val[0]; + } + if (val[1] && val[1] == +val[1]) { + val[1] = +val[1]; + } + + if (options.values && options.values.length) { + data.from = val[0] && options.values.indexOf(val[0]); + data.to = val[1] && options.values.indexOf(val[1]); + } else { + data.from = val[0] && +val[0]; + data.to = val[1] && +val[1]; + } } // get config from options diff --git a/js/ion.rangeSlider.min.js b/js/ion.rangeSlider.min.js index ec96b97..7a232da 100644 --- a/js/ion.rangeSlider.min.js +++ b/js/ion.rangeSlider.min.js @@ -1,13 +1,14 @@ -// Ion.RangeSlider | version 2.0.5 | https://github.com/IonDen/ion.rangeSlider -(function(g,q,h,r,u){var t=0,n=function(){var a=r.userAgent,b=/msie\s\d+/i;return 0a)?(g("html").addClass("lt-ie9"),!0):!1}();Function.prototype.bind||(Function.prototype.bind=function(a){var b=this,c=[].slice;if("function"!=typeof b)throw new TypeError;var d=c.call(arguments,1),f=function(){if(this instanceof f){var e=function(){};e.prototype=b.prototype;var e=new e,k=b.apply(e,d.concat(c.call(arguments)));return Object(k)===k?k:e}return b.apply(a, -d.concat(c.call(arguments)))};return f});var p=function(a,b,c){this.VERSION="2.0.5";this.input=a;this.plugin_count=c;this.old_to=this.old_from=this.calc_count=this.current_plugin=0;this.raf_id=null;this.is_update=this.is_key=this.force_redraw=this.dragging=!1;this.is_start=!0;this.is_click=this.is_resize=this.is_active=!1;this.$cache={win:g(h),body:g(q.body),input:g(a),cont:null,rs:null,min:null,max:null,from:null,to:null,single:null,bar:null,line:null,s_single:null,s_from:null,s_to:null,shad_single:null, -shad_from:null,shad_to:null,grid:null,grid_labels:[]};c=this.$cache.input;a={type:c.data("type"),min:c.data("min"),max:c.data("max"),from:c.data("from"),to:c.data("to"),step:c.data("step"),min_interval:c.data("minInterval"),max_interval:c.data("maxInterval"),drag_interval:c.data("dragInterval"),values:c.data("values"),from_fixed:c.data("fromFixed"),from_min:c.data("fromMin"),from_max:c.data("fromMax"),from_shadow:c.data("fromShadow"),to_fixed:c.data("toFixed"),to_min:c.data("toMin"),to_max:c.data("toMax"), -to_shadow:c.data("toShadow"),prettify_enabled:c.data("prettifyEnabled"),prettify_separator:c.data("prettifySeparator"),force_edges:c.data("forceEdges"),keyboard:c.data("keyboard"),keyboard_step:c.data("keyboardStep"),grid:c.data("grid"),grid_margin:c.data("gridMargin"),grid_num:c.data("gridNum"),grid_snap:c.data("gridSnap"),hide_min_max:c.data("hideMinMax"),hide_from_to:c.data("hideFromTo"),prefix:c.data("prefix"),postfix:c.data("postfix"),max_postfix:c.data("maxPostfix"),decorate_both:c.data("decorateBoth"), -values_separator:c.data("valuesSeparator"),disable:c.data("disable")};a.values=a.values&&a.values.split(",");b=g.extend(a,b);(c=c.prop("value"))&&(c=c.split(";"));c&&b.values&&b.values.length?(a.from=c[0]&&b.values.indexOf(c[0]),a.to=c[1]&&b.values.indexOf(c[1])):(a.from=c[0]&&+c[0],a.to=c[1]&&+c[1]);this.options=g.extend({type:"single",min:10,max:100,from:null,to:null,step:1,min_interval:0,max_interval:0,drag_interval:!1,values:[],p_values:[],from_fixed:!1,from_min:null,from_max:null,from_shadow:!1, -to_fixed:!1,to_min:null,to_max:null,to_shadow:!1,prettify_enabled:!0,prettify_separator:" ",prettify:null,force_edges:!1,keyboard:!1,keyboard_step:5,grid:!1,grid_margin:!0,grid_num:4,grid_snap:!1,hide_min_max:!1,hide_from_to:!1,prefix:"",postfix:"",max_postfix:"",decorate_both:!0,values_separator:" \u2014 ",disable:!1,onStart:null,onChange:null,onFinish:null,onUpdate:null},b);this.validate();this.result={input:this.$cache.input,slider:null,min:this.options.min,max:this.options.max,from:this.options.from, -from_percent:0,from_value:null,to:this.options.to,to_percent:0,to_value:null};this.coords={x_gap:0,x_pointer:0,w_rs:0,w_rs_old:0,w_handle:0,p_gap:0,p_gap_left:0,p_gap_right:0,p_step:0,p_pointer:0,p_handle:0,p_single:0,p_single_real:0,p_from:0,p_from_real:0,p_to:0,p_to_real:0,p_bar_x:0,p_bar_w:0,grid_gap:0,big_num:0,big:[],big_w:[],big_p:[],big_x:[]};this.labels={w_min:0,w_max:0,w_from:0,w_to:0,w_single:0,p_min:0,p_max:0,p_from:0,p_from_left:0,p_to:0,p_to_left:0,p_single:0,p_single_left:0};this.init()}; -p.prototype={init:function(a){this.coords.p_step=this.options.step/((this.options.max-this.options.min)/100);this.target="base";this.toggleInput();this.append();this.setMinMax();if(a){if(this.force_redraw=!0,this.calc(!0),this.options.onUpdate&&"function"===typeof this.options.onUpdate)this.options.onUpdate(this.result)}else if(this.force_redraw=!0,this.calc(!0),this.options.onStart&&"function"===typeof this.options.onStart)this.options.onStart(this.result);this.updateScene();this.raf_id=requestAnimationFrame(this.updateScene.bind(this))}, -append:function(){this.$cache.input.before('');this.$cache.input.prop("readonly",!0);this.$cache.cont=this.$cache.input.prev();this.result.slider=this.$cache.cont;this.$cache.cont.html('01000'); +// Ion.RangeSlider | version 2.0.6 | https://github.com/IonDen/ion.rangeSlider +(function(g,q,h,r,u){var t=0,n=function(){var a=r.userAgent,b=/msie\s\d+/i;return 0a)?(g("html").addClass("lt-ie9"),!0):!1}();Function.prototype.bind||(Function.prototype.bind=function(a){var b=this,c=[].slice;if("function"!=typeof b)throw new TypeError;var d=c.call(arguments,1),e=function(){if(this instanceof e){var f=function(){};f.prototype=b.prototype;var f=new f,k=b.apply(f,d.concat(c.call(arguments)));return Object(k)===k?k:f}return b.apply(a, +d.concat(c.call(arguments)))};return e});Array.prototype.indexOf||(Array.prototype.indexOf=function(a,b){var c;if(null==this)throw new TypeError('"this" is null or not defined');var d=Object(this),e=d.length>>>0;if(0===e)return-1;c=+b||0;Infinity===Math.abs(c)&&(c=0);if(c>=e)return-1;for(c=Math.max(0<=c?c:e-Math.abs(c),0);c');this.$cache.input.prop("readonly",!0);this.$cache.cont=this.$cache.input.prev();this.result.slider=this.$cache.cont;this.$cache.cont.html('01000'); this.$cache.rs=this.$cache.cont.find(".irs");this.$cache.min=this.$cache.cont.find(".irs-min");this.$cache.max=this.$cache.cont.find(".irs-max");this.$cache.from=this.$cache.cont.find(".irs-from");this.$cache.to=this.$cache.cont.find(".irs-to");this.$cache.single=this.$cache.cont.find(".irs-single");this.$cache.bar=this.$cache.cont.find(".irs-bar");this.$cache.line=this.$cache.cont.find(".irs-line");this.$cache.grid=this.$cache.cont.find(".irs-grid");"single"===this.options.type?(this.$cache.cont.append(''), this.$cache.s_single=this.$cache.cont.find(".single"),this.$cache.from[0].style.visibility="hidden",this.$cache.to[0].style.visibility="hidden",this.$cache.shad_single=this.$cache.cont.find(".shadow-single")):(this.$cache.cont.append(''),this.$cache.s_from=this.$cache.cont.find(".from"),this.$cache.s_to=this.$cache.cont.find(".to"),this.$cache.shad_from= this.$cache.cont.find(".shadow-from"),this.$cache.shad_to=this.$cache.cont.find(".shadow-to"));this.options.hide_from_to&&(this.$cache.from[0].style.display="none",this.$cache.to[0].style.display="none",this.$cache.single[0].style.display="none");this.appendGrid();this.options.disable?(this.appendDisableMask(),this.$cache.input[0].disabled=!0):(this.$cache.cont.removeClass("irs-disabled"),this.$cache.input[0].disabled=!1,this.bindEvents())},appendDisableMask:function(){this.$cache.cont.append(''); @@ -45,23 +46,23 @@ a?this.decorate(b[this.result.from]):this.decorate(this._prettify(this.result.fr a=this.decorate(b[this.result.from]+this.options.values_separator+b[this.result.to]),c=this.decorate(b[this.result.from]),b=this.decorate(b[this.result.to])):(this.options.decorate_both?(a=this.decorate(this._prettify(this.result.from)),a+=this.options.values_separator,a+=this.decorate(this._prettify(this.result.to))):a=this.decorate(this._prettify(this.result.from)+this.options.values_separator+this._prettify(this.result.to),this.result.from),c=this.decorate(this._prettify(this.result.from),this.result.from), b=this.decorate(this._prettify(this.result.to),this.result.to));this.$cache.single.html(a);this.$cache.from.html(c);this.$cache.to.html(b);this.calcLabels();b=Math.min(this.labels.p_single_left,this.labels.p_from_left);a=this.labels.p_single_left+this.labels.p_single;c=this.labels.p_to_left+this.labels.p_to;var d=Math.max(a,c);this.labels.p_from_left+this.labels.p_from>=this.labels.p_to_left?(this.$cache.from[0].style.visibility="hidden",this.$cache.to[0].style.visibility="hidden",this.$cache.single[0].style.visibility= "visible",this.result.from===this.result.to?(this.$cache.from[0].style.visibility="visible",this.$cache.single[0].style.visibility="hidden",d=c):(this.$cache.from[0].style.visibility="hidden",this.$cache.single[0].style.visibility="visible",d=Math.max(a,c))):(this.$cache.from[0].style.visibility="visible",this.$cache.to[0].style.visibility="visible",this.$cache.single[0].style.visibility="hidden");this.$cache.min[0].style.visibility=b100-this.labels.p_max-1?"hidden":"visible"}}},drawShadow:function(){var a=this.options,b=this.$cache,c="number"===typeof a.from_min&&!isNaN(a.from_min),d="number"===typeof a.from_max&&!isNaN(a.from_max),f="number"===typeof a.to_min&&!isNaN(a.to_min),e="number"===typeof a.to_max&&!isNaN(a.to_max);"single"===a.type?a.from_shadow&&(c||d)?(c=this.calcPercent(a.from_min||a.min),d=this.calcPercent(a.from_max||a.max)-c,c=this.toFixed(c-this.coords.p_handle/100*c),d=this.toFixed(d-this.coords.p_handle/ +d>100-this.labels.p_max-1?"hidden":"visible"}}},drawShadow:function(){var a=this.options,b=this.$cache,c="number"===typeof a.from_min&&!isNaN(a.from_min),d="number"===typeof a.from_max&&!isNaN(a.from_max),e="number"===typeof a.to_min&&!isNaN(a.to_min),f="number"===typeof a.to_max&&!isNaN(a.to_max);"single"===a.type?a.from_shadow&&(c||d)?(c=this.calcPercent(a.from_min||a.min),d=this.calcPercent(a.from_max||a.max)-c,c=this.toFixed(c-this.coords.p_handle/100*c),d=this.toFixed(d-this.coords.p_handle/ 100*d),c+=this.coords.p_handle/2,b.shad_single[0].style.display="block",b.shad_single[0].style.left=c+"%",b.shad_single[0].style.width=d+"%"):b.shad_single[0].style.display="none":(a.from_shadow&&(c||d)?(c=this.calcPercent(a.from_min||a.min),d=this.calcPercent(a.from_max||a.max)-c,c=this.toFixed(c-this.coords.p_handle/100*c),d=this.toFixed(d-this.coords.p_handle/100*d),c+=this.coords.p_handle/2,b.shad_from[0].style.display="block",b.shad_from[0].style.left=c+"%",b.shad_from[0].style.width=d+"%"): -b.shad_from[0].style.display="none",a.to_shadow&&(f||e)?(f=this.calcPercent(a.to_min||a.min),a=this.calcPercent(a.to_max||a.max)-f,f=this.toFixed(f-this.coords.p_handle/100*f),a=this.toFixed(a-this.coords.p_handle/100*a),f+=this.coords.p_handle/2,b.shad_to[0].style.display="block",b.shad_to[0].style.left=f+"%",b.shad_to[0].style.width=a+"%"):b.shad_to[0].style.display="none")},toggleInput:function(){this.$cache.input.toggleClass("irs-hidden-input")},calcPercent:function(a){return this.toFixed((a- +b.shad_from[0].style.display="none",a.to_shadow&&(e||f)?(e=this.calcPercent(a.to_min||a.min),a=this.calcPercent(a.to_max||a.max)-e,e=this.toFixed(e-this.coords.p_handle/100*e),a=this.toFixed(a-this.coords.p_handle/100*a),e+=this.coords.p_handle/2,b.shad_to[0].style.display="block",b.shad_to[0].style.left=e+"%",b.shad_to[0].style.width=a+"%"):b.shad_to[0].style.display="none")},toggleInput:function(){this.$cache.input.toggleClass("irs-hidden-input")},calcPercent:function(a){return this.toFixed((a- this.options.min)/((this.options.max-this.options.min)/100))},calcReal:function(a){var b=this.options.min,c=this.options.max,d=0;0>b&&(d=Math.abs(b),b+=d,c+=d);a=(c-b)/100*a+b;(b=this.options.step.toString().split(".")[1])?a=+a.toFixed(b.length):(a/=this.options.step,a*=this.options.step,a=+a.toFixed(0));d&&(a-=d);athis.options.max&&(a=this.options.max);return b?+a.toFixed(b.length):this.toFixed(a)},calcWithStep:function(a){var b=Math.round(a/this.coords.p_step)* this.coords.p_step;100d.max_interval&&(a=b-d.max_interval):a-b>d.max_interval&& (a=b+d.max_interval);return this.calcPercent(a)},checkDiapason:function(a,b,c){a=this.calcReal(a);var d=this.options;b&&"number"===typeof b||(b=d.min);c&&"number"===typeof c||(c=d.max);ac&&(a=c);return this.calcPercent(a)},toFixed:function(a){a=a.toFixed(5);return+a},_prettify:function(a){return this.options.prettify_enabled?this.options.prettify&&"function"===typeof this.options.prettify?this.options.prettify(a):this.prettify(a):a},prettify:function(a){return a.toString().replace(/(\d{1,3}(?=(?:\d\d\d)+(?!\d)))/g, -"$1"+this.options.prettify_separator)},checkEdges:function(a,b){if(!this.options.force_edges)return this.toFixed(a);0>a?a=0:a>100-b&&(a=100-b);return this.toFixed(a)},validate:function(){var a=this.options,b=this.result,c=a.values,d=c.length,f,e;"string"===typeof a.min&&(a.min=+a.min);"string"===typeof a.max&&(a.max=+a.max);"string"===typeof a.from&&(a.from=+a.from);"string"===typeof a.to&&(a.to=+a.to);"string"===typeof a.step&&(a.step=+a.step);"string"===typeof a.from_min&&(a.from_min=+a.from_min); -"string"===typeof a.from_max&&(a.from_max=+a.from_max);"string"===typeof a.to_min&&(a.to_min=+a.to_min);"string"===typeof a.to_max&&(a.to_max=+a.to_max);"string"===typeof a.keyboard_step&&(a.keyboard_step=+a.keyboard_step);"string"===typeof a.grid_num&&(a.grid_num=+a.grid_num);a.max<=a.min&&(a.max=a.min?2*a.min:a.min+1,a.step=1);if(d)for(a.p_values=[],a.min=0,a.max=d-1,a.step=1,a.grid_num=a.max,a.grid_snap=!0,e=0;ea?a=0:a>100-b&&(a=100-b);return this.toFixed(a)},validate:function(){var a=this.options,b=this.result,c=a.values,d=c.length,e,f;"string"===typeof a.min&&(a.min=+a.min);"string"===typeof a.max&&(a.max=+a.max);"string"===typeof a.from&&(a.from=+a.from);"string"===typeof a.to&&(a.to=+a.to);"string"===typeof a.step&&(a.step=+a.step);"string"===typeof a.from_min&&(a.from_min=+a.from_min); +"string"===typeof a.from_max&&(a.from_max=+a.from_max);"string"===typeof a.to_min&&(a.to_min=+a.to_min);"string"===typeof a.to_max&&(a.to_max=+a.to_max);"string"===typeof a.keyboard_step&&(a.keyboard_step=+a.keyboard_step);"string"===typeof a.grid_num&&(a.grid_num=+a.grid_num);a.max<=a.min&&(a.max=a.min?2*a.min:a.min+1,a.step=1);if(d)for(a.p_values=[],a.min=0,a.max=d-1,a.step=1,a.grid_num=a.max,a.grid_snap=!0,f=0;fa.max)a.from=a.min;if(a.to>a.max||a.toa.to&&(a.from=a.to);if("number"!==typeof a.step||isNaN(a.step)||!a.step||0>a.step)a.step=1;if("number"!==typeof a.keyboard_step||isNaN(a.keyboard_step)||!a.keyboard_step||0>a.keyboard_step)a.keyboard_step=5;a.from_min&&a.froma.from_max&&(a.from=a.from_max); a.to_min&&a.toa.to_max&&(a.to=a.to_max);if(b){b.min!==a.min&&(b.min=a.min);b.max!==a.max&&(b.max=a.max);if(b.fromb.max)b.from=a.from;if(b.tob.max)b.to=a.to}if("number"!==typeof a.min_interval||isNaN(a.min_interval)||!a.min_interval||0>a.min_interval)a.min_interval=0;if("number"!==typeof a.max_interval||isNaN(a.max_interval)||!a.max_interval||0>a.max_interval)a.max_interval=0;a.min_interval&&a.min_interval>a.max-a.min&&(a.min_interval= a.max-a.min);a.max_interval&&a.max_interval>a.max-a.min&&(a.max_interval=a.max-a.min)},decorate:function(a,b){var c="",d=this.options;d.prefix&&(c+=d.prefix);c+=a;d.max_postfix&&(d.values.length&&a===d.p_values[d.max]?(c+=d.max_postfix,d.postfix&&(c+=" ")):b===d.max&&(c+=d.max_postfix,d.postfix&&(c+=" ")));d.postfix&&(c+=d.postfix);return c},updateFrom:function(){this.result.from=this.options.from;this.result.from_percent=this.calcPercent(this.result.from);this.options.values&&(this.result.from_value= -this.options.values[this.result.from])},updateTo:function(){this.result.to=this.options.to;this.result.to_percent=this.calcPercent(this.result.to);this.options.values&&(this.result.to_value=this.options.values[this.result.to])},updateResult:function(){this.result.min=this.options.min;this.result.max=this.options.max;this.updateFrom();this.updateTo()},appendGrid:function(){if(this.options.grid){var a=this.options,b,c;b=a.max-a.min;var d=a.grid_num,f=0,e=0,k=4,g,h,l=0,m="";this.calcGridMargin();a.grid_snap? -(d=b/a.step,f=this.toFixed(a.step/(b/100))):f=this.toFixed(100/d);4g&&(g=0));this.coords.big[b]=e;h=(e-f*(b-1))/(g+1);for(c=1;c<=g&&0!==e;c++)l=this.toFixed(e-h*c),m+='';m+='';l=this.calcReal(e);l=a.values.length?a.p_values[l]:this._prettify(l);m+=''+l+""}this.coords.big_num=Math.ceil(d+1);this.$cache.cont.addClass("irs-with-grid");this.$cache.grid.html(m);this.cacheGridLabels()}},cacheGridLabels:function(){var a,b,c=this.coords.big_num;for(b=0;bg&&(g=0));this.coords.big[b]=f;h=(f-e*(b-1))/(g+1);for(c=1;c<=g&&0!==f;c++)l=this.toFixed(f-h*c),m+='';m+='';l=this.calcReal(f);l=a.values.length?a.p_values[l]:this._prettify(l);m+=''+l+""}this.coords.big_num=Math.ceil(d+1);this.$cache.cont.addClass("irs-with-grid");this.$cache.grid.html(m);this.cacheGridLabels()}},cacheGridLabels:function(){var a,b,c=this.coords.big_num;for(b=0;b100-this.coords.grid_gap&&(c[d-1]=100-this.coords.grid_gap,b[d-1]=this.toFixed(c[d-1]-this.coords.big_p[d-1]), -this.coords.big_x[d-1]=this.toFixed(this.coords.big_p[d-1]-this.coords.grid_gap)));this.calcGridCollision(2,b,c);this.calcGridCollision(4,b,c);for(a=0;a=g)break;e=this.$cache.grid_labels[f][0];e.style.visibility=c[d]<=b[f]?"visible":"hidden"}},calcGridMargin:function(){this.options.grid_margin&&(this.coords.w_rs=this.$cache.rs.outerWidth(!1), +this.coords.big_x[d-1]=this.toFixed(this.coords.big_p[d-1]-this.coords.grid_gap)));this.calcGridCollision(2,b,c);this.calcGridCollision(4,b,c);for(a=0;a=g)break;f=this.$cache.grid_labels[e][0];f.style.visibility=c[d]<=b[e]?"visible":"hidden"}},calcGridMargin:function(){this.options.grid_margin&&(this.coords.w_rs=this.$cache.rs.outerWidth(!1), this.coords.w_rs&&(this.coords.w_handle="single"===this.options.type?this.$cache.s_single.outerWidth(!1):this.$cache.s_from.outerWidth(!1),this.coords.p_handle=this.toFixed(this.coords.w_handle/this.coords.w_rs*100),this.coords.grid_gap=this.toFixed(this.coords.p_handle/2-.1),this.$cache.grid[0].style.width=this.toFixed(100-this.coords.p_handle)+"%",this.$cache.grid[0].style.left=this.coords.grid_gap+"%"))},update:function(a){this.input&&(this.is_update=!0,this.options.from=this.result.from,this.options.to= this.result.to,this.options=g.extend(this.options,a),this.validate(),this.updateResult(a),this.toggleInput(),this.remove(),this.init(!0))},reset:function(){this.input&&(this.updateResult(),this.update())},destroy:function(){this.input&&(this.toggleInput(),this.$cache.input.prop("readonly",!1),g.data(this.input,"ionRangeSlider",null),this.remove(),this.options=this.input=null)}};g.fn.ionRangeSlider=function(a){return this.each(function(){g.data(this,"ionRangeSlider")||g.data(this,"ionRangeSlider", -new p(this,a,t++))})};(function(){for(var a=0,b=["ms","moz","webkit","o"],c=0;c English description | Описание на русском Easy and light range slider * Project page and demos -* Download ion.rangeSlider-2.0.5.zip +* Download ion.rangeSlider-2.0.6.zip *** diff --git a/readme.ru.md b/readme.ru.md index bc5d35a..7fbe3b9 100644 --- a/readme.ru.md +++ b/readme.ru.md @@ -1,10 +1,10 @@ -# Ion.Range Slider 2.0.5 +# Ion.Range Slider 2.0.6 > English description | Описание на русском Удобный легкий слайдер диапазонов * Страница проекта и демо -* Download ion.rangeSlider-2.0.5.zip +* Download ion.rangeSlider-2.0.6.zip ***