Skip to content

Commit

Permalink
Release 11.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
leongersen committed Apr 2, 2018
1 parent 1ec5da0 commit eef2edd
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 15 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ npm [(package)](https://www.npmjs.com/package/nouislider)
Changelog
---------

### 11.1.0 (*2018-04-02*)
- Change: `null` options are now handled consistently (#856);
- Fixed: Missing transform origin in IE9 (#870);
- Fixed: `padding` on one side of the slider could not exceed `50%` (#865);

### 11.0.3 (*2018-01-21*)
Refactor of source code. There are no meaningful changes in the distributed files;

Expand Down
3 changes: 2 additions & 1 deletion distribute/nouislider.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! nouislider - 11.0.3 - 2018-01-21 14:04:07 */
/*! nouislider - 11.1.0 - 2018-04-02 11:18:13 */
/* Functional styling;
* These styles are required for noUiSlider to function.
* You don't need to change these rules to apply your design.
Expand Down Expand Up @@ -42,6 +42,7 @@
left: 0;
height: 100%;
width: 100%;
-ms-transform-origin: 0 0;
-webkit-transform-origin: 0 0;
transform-origin: 0 0;
}
Expand Down
24 changes: 14 additions & 10 deletions distribute/nouislider.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! nouislider - 11.0.3 - 2018-01-21 14:04:07 */
/*! nouislider - 11.1.0 - 2018-04-02 11:18:13 */

(function (factory) {

Expand All @@ -22,7 +22,7 @@

'use strict';

var VERSION = '11.0.3';
var VERSION = '11.1.0';


function isValidFormatter ( entry ) {
Expand All @@ -33,6 +33,10 @@
el.parentElement.removeChild(el);
}

function isSet ( value ) {
return value !== null && value !== undefined;
}

// Bindable version
function preventDefault ( e ) {
e.preventDefault();
Expand Down Expand Up @@ -669,8 +673,8 @@
throw new Error("noUiSlider (" + VERSION + "): 'padding' option must be a positive number(s).");
}

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

Expand Down Expand Up @@ -768,7 +772,7 @@

function testCssPrefix ( parsed, entry ) {

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

Expand All @@ -777,7 +781,7 @@

function testCssClasses ( parsed, entry ) {

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

Expand Down Expand Up @@ -829,8 +833,8 @@
'ariaFormat': { r: false, t: testAriaFormat },
'format': { r: false, t: testFormat },
'tooltips': { r: false, t: testTooltips },
'cssPrefix': { r: false, t: testCssPrefix },
'cssClasses': { r: false, t: testCssClasses }
'cssPrefix': { r: true, t: testCssPrefix },
'cssClasses': { r: true, t: testCssClasses }
};

var defaults = {
Expand Down Expand Up @@ -887,7 +891,7 @@
Object.keys(tests).forEach(function( name ){

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

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

tests[name].t( parsed, options[name] === undefined ? defaults[name] : options[name] );
tests[name].t( parsed, !isSet(options[name]) ? defaults[name] : options[name] );
});

// Forward pips options
Expand Down
2 changes: 1 addition & 1 deletion distribute/nouislider.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions distribute/nouislider.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nouislider",
"version": "11.0.3",
"version": "11.1.0",
"main": "distribute/nouislider",
"style": "distribute/nouislider.min.css",
"license": "WTFPL",
Expand Down

0 comments on commit eef2edd

Please sign in to comment.