react-slider
Advanced tools
Comparing version 0.10.0 to 0.10.1
{ | ||
"name": "react-slider", | ||
"version": "0.10.0", | ||
"version": "0.10.1", | ||
"description": "Slider component for React", | ||
@@ -5,0 +5,0 @@ "main": "react-slider.js", |
@@ -235,3 +235,3 @@ (function (root, factory) { | ||
if (this.state.upperBound === 0) { | ||
this._handleResize(); | ||
this._resize(); | ||
} | ||
@@ -264,3 +264,3 @@ }, | ||
window.addEventListener('resize', this._handleResize); | ||
this._handleResize(); | ||
this._resize(); | ||
}, | ||
@@ -277,9 +277,4 @@ | ||
_handleResize: function () { | ||
// setTimeout of 0 gives element enough time to have assumed its new size if it is being resized | ||
var resizeTimeout = window.setTimeout(function() { | ||
// drop this timeout from pendingResizeTimeouts to reduce memory usage | ||
this.pendingResizeTimeouts.shift(); | ||
var slider = this.refs.slider; | ||
_resize: function () { | ||
var slider = this.refs.slider; | ||
var handle = this.refs.handle0; | ||
@@ -299,2 +294,10 @@ var rect = slider.getBoundingClientRect(); | ||
}); | ||
}, | ||
_handleResize: function () { | ||
// setTimeout of 0 gives element enough time to have assumed its new size if it is being resized | ||
var resizeTimeout = window.setTimeout(function() { | ||
// drop this timeout from pendingResizeTimeouts to reduce memory usage | ||
this.pendingResizeTimeouts.shift(); | ||
this._resize(); | ||
}.bind(this), 0); | ||
@@ -552,5 +555,7 @@ | ||
case "ArrowUp": | ||
e.preventDefault(); | ||
return this._moveDownOneStep(); | ||
case "ArrowRight": | ||
case "ArrowDown": | ||
e.preventDefault(); | ||
return this._moveUpOneStep(); | ||
@@ -557,0 +562,0 @@ case "Home": |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
37105
755