Skip to content

Commit

Permalink
noUiSlider 13.1.3
Browse files Browse the repository at this point in the history
  • Loading branch information
leongersen committed Mar 15, 2019
1 parent 79fdc51 commit 547b3c3
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 22 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.MD
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

### 13.1.3 (*2019-03-15*)
- Fixed: Keyboard interaction allows handles to "push" other handles (#960);
- Fixed: Update event fires for all handles during keyboard interaction (#960);

### 13.1.2 (*2019-03-13*)
- Fixed: Handle disappears in Safari on tap (#927);
- Fixed: Disabled slider still accepts keyboard interaction (#953);
Expand Down
2 changes: 1 addition & 1 deletion distribute/nouislider.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! nouislider - 13.1.2 - 3/13/2019 */
/*! nouislider - 13.1.3 - 3/15/2019 */
/* Functional styling;
* These styles are required for noUiSlider to function.
* You don't need to change these rules to apply your design.
Expand Down
26 changes: 9 additions & 17 deletions distribute/nouislider.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! nouislider - 13.1.2 - 3/13/2019 */
/*! nouislider - 13.1.3 - 3/15/2019 */
(function(factory) {
if (typeof define === "function" && define.amd) {
// AMD. Register as an anonymous module.
Expand All @@ -13,7 +13,7 @@
})(function() {
"use strict";

var VERSION = "13.1.2";
var VERSION = "13.1.3";

//region Helper Methods

Expand Down Expand Up @@ -975,9 +975,6 @@
var scope_Pips;
var scope_Tooltips;

// Override for the 'animate' option
var scope_ShouldAnimate = true;

// Slider state values
var scope_Spectrum = options.spectrum;
var scope_Values = [];
Expand Down Expand Up @@ -1833,12 +1830,8 @@
// Decrement for down steps
step = (isDown ? -1 : 1) * step;

scope_ShouldAnimate = false;

valueSetHandle(handleNumber, scope_Values[handleNumber] + step, true);

scope_ShouldAnimate = true;

return false;
}

Expand Down Expand Up @@ -2181,7 +2174,7 @@

// Animation is optional.
// Make sure the initial values were set before using animated placement.
if (options.animate && !isInit && scope_ShouldAnimate) {
if (options.animate && !isInit) {
addClassFor(scope_Target, options.cssClasses.tap, options.animationDuration);
}

Expand Down Expand Up @@ -2214,22 +2207,21 @@

// Set value for a single handle
function valueSetHandle(handleNumber, value, fireSetEvent) {
var values = [];

// Ensure numeric input
handleNumber = Number(handleNumber);

if (!(handleNumber >= 0 && handleNumber < scope_HandleNumbers.length)) {
throw new Error("noUiSlider (" + VERSION + "): invalid handle number, got: " + handleNumber);
}

for (var i = 0; i < scope_HandleNumbers.length; i++) {
values[i] = null;
}
// Look both backward and forward, since we don't want this handle to "push" other handles (#960);
setHandle(handleNumber, resolveToValue(value, handleNumber), true, true);

values[handleNumber] = value;
fireEvent("update", handleNumber);

valueSet(values, fireSetEvent);
if (fireSetEvent) {
fireEvent("set", handleNumber);
}
}

// Get the slider value.
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": "13.1.2",
"version": "13.1.3",
"main": "distribute/nouislider.js",
"style": "distribute/nouislider.min.css",
"license": "MIT",
Expand Down

0 comments on commit 547b3c3

Please sign in to comment.