Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-slider

Package Overview
Dependencies
Maintainers
1
Versions
54
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-slider - npm Package Compare versions

Comparing version 0.6.0 to 0.6.1

2

package.json
{
"name": "react-slider",
"version": "0.6.0",
"version": "0.6.1",
"description": "Slider component for React",

@@ -5,0 +5,0 @@ "main": "react-slider.js",

@@ -203,2 +203,5 @@ (function (root, factory) {

// array for storing resize timeouts ids
this.pendingResizeTimeouts = [];
var zIndices = [];

@@ -268,3 +271,3 @@ for (var i = 0; i < value.length; i++) {

componentWillUnmount: function () {
clearTimeout(this.resizeTimeout)
this._clearPendingResizeTimeouts();
window.removeEventListener('resize', this._handleResize);

@@ -279,3 +282,6 @@ },

// setTimeout of 0 gives element enough time to have assumed its new size if it is being resized
this.resizeTimeout = window.setTimeout(function() {
var resizeTimeout = window.setTimeout(function() {
// drop this timeout from pendingResizeTimeouts to reduce memory usage
this.pendingResizeTimeouts.shift();
var slider = this.refs.slider;

@@ -297,4 +303,15 @@ var handle = this.refs.handle0;

}.bind(this), 0);
this.pendingResizeTimeouts.push(resizeTimeout);
},
// clear all pending timeouts to avoid error messages after unmounting
_clearPendingResizeTimeouts: function() {
do {
var nextTimeout = this.pendingResizeTimeouts.shift();
clearTimeout(nextTimeout);
} while (this.pendingResizeTimeouts.length);
},
// calculates the offset of a handle in pixels based on its value.

@@ -301,0 +318,0 @@ _calcOffset: function (value) {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc