Skip to content

Commit eef2edd

Browse files
committed
Release 11.1.0
1 parent 1ec5da0 commit eef2edd

File tree

6 files changed

+25
-15
lines changed

6 files changed

+25
-15
lines changed

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@ npm [(package)](https://www.npmjs.com/package/nouislider)
2727
Changelog
2828
---------
2929

30+
### 11.1.0 (*2018-04-02*)
31+
- Change: `null` options are now handled consistently (#856);
32+
- Fixed: Missing transform origin in IE9 (#870);
33+
- Fixed: `padding` on one side of the slider could not exceed `50%` (#865);
34+
3035
### 11.0.3 (*2018-01-21*)
3136
Refactor of source code. There are no meaningful changes in the distributed files;
3237

distribute/nouislider.css

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! nouislider - 11.0.3 - 2018-01-21 14:04:07 */
1+
/*! nouislider - 11.1.0 - 2018-04-02 11:18:13 */
22
/* Functional styling;
33
* These styles are required for noUiSlider to function.
44
* You don't need to change these rules to apply your design.
@@ -42,6 +42,7 @@
4242
left: 0;
4343
height: 100%;
4444
width: 100%;
45+
-ms-transform-origin: 0 0;
4546
-webkit-transform-origin: 0 0;
4647
transform-origin: 0 0;
4748
}

distribute/nouislider.js

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! nouislider - 11.0.3 - 2018-01-21 14:04:07 */
1+
/*! nouislider - 11.1.0 - 2018-04-02 11:18:13 */
22

33
(function (factory) {
44

@@ -22,7 +22,7 @@
2222

2323
'use strict';
2424

25-
var VERSION = '11.0.3';
25+
var VERSION = '11.1.0';
2626

2727

2828
function isValidFormatter ( entry ) {
@@ -33,6 +33,10 @@
3333
el.parentElement.removeChild(el);
3434
}
3535

36+
function isSet ( value ) {
37+
return value !== null && value !== undefined;
38+
}
39+
3640
// Bindable version
3741
function preventDefault ( e ) {
3842
e.preventDefault();
@@ -669,8 +673,8 @@
669673
throw new Error("noUiSlider (" + VERSION + "): 'padding' option must be a positive number(s).");
670674
}
671675

672-
if ( parsed.padding[0] >= 50 || parsed.padding[1] >= 50 ) {
673-
throw new Error("noUiSlider (" + VERSION + "): 'padding' option must be less than half the range.");
676+
if ( parsed.padding[0] + parsed.padding[1] >= 100 ) {
677+
throw new Error("noUiSlider (" + VERSION + "): 'padding' option must not exceed 100% of the range.");
674678
}
675679
}
676680

@@ -768,7 +772,7 @@
768772

769773
function testCssPrefix ( parsed, entry ) {
770774

771-
if ( entry !== undefined && typeof entry !== 'string' && entry !== false ) {
775+
if ( typeof entry !== 'string' && entry !== false ) {
772776
throw new Error("noUiSlider (" + VERSION + "): 'cssPrefix' must be a string or `false`.");
773777
}
774778

@@ -777,7 +781,7 @@
777781

778782
function testCssClasses ( parsed, entry ) {
779783

780-
if ( entry !== undefined && typeof entry !== 'object' ) {
784+
if ( typeof entry !== 'object' ) {
781785
throw new Error("noUiSlider (" + VERSION + "): 'cssClasses' must be an object.");
782786
}
783787

@@ -829,8 +833,8 @@
829833
'ariaFormat': { r: false, t: testAriaFormat },
830834
'format': { r: false, t: testFormat },
831835
'tooltips': { r: false, t: testTooltips },
832-
'cssPrefix': { r: false, t: testCssPrefix },
833-
'cssClasses': { r: false, t: testCssClasses }
836+
'cssPrefix': { r: true, t: testCssPrefix },
837+
'cssClasses': { r: true, t: testCssClasses }
834838
};
835839

836840
var defaults = {
@@ -887,7 +891,7 @@
887891
Object.keys(tests).forEach(function( name ){
888892

889893
// If the option isn't set, but it is required, throw an error.
890-
if ( options[name] === undefined && defaults[name] === undefined ) {
894+
if ( !isSet(options[name]) && defaults[name] === undefined ) {
891895

892896
if ( tests[name].r ) {
893897
throw new Error("noUiSlider (" + VERSION + "): '" + name + "' is required.");
@@ -896,7 +900,7 @@
896900
return true;
897901
}
898902

899-
tests[name].t( parsed, options[name] === undefined ? defaults[name] : options[name] );
903+
tests[name].t( parsed, !isSet(options[name]) ? defaults[name] : options[name] );
900904
});
901905

902906
// Forward pips options

distribute/nouislider.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

distribute/nouislider.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "nouislider",
3-
"version": "11.0.3",
3+
"version": "11.1.0",
44
"main": "distribute/nouislider",
55
"style": "distribute/nouislider.min.css",
66
"license": "WTFPL",

0 commit comments

Comments
 (0)