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

rc-tabs

Package Overview
Dependencies
Maintainers
2
Versions
228
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rc-tabs - npm Package Compare versions

Comparing version 5.4.1 to 5.4.2

README.md

56

lib/Nav.js

@@ -49,2 +49,3 @@ 'use strict';

}
var navNode = this.refs.nav;

@@ -56,21 +57,19 @@ var navNodeWH = this.getOffsetWH(navNode);

var offset = state.offset;
if (navWrapNodeWH - offset < navNodeWH) {
if (!state.next) {
this.setNext(true);
}
var minOffset = navWrapNodeWH - navNodeWH;
if (minOffset >= 0) {
this.setNext(false);
this.setOffset(0);
offset = 0;
} else if (minOffset < offset) {
this.setNext(true);
} else {
var minOffset = navWrapNodeWH - navNodeWH;
if (minOffset < 0 && minOffset > offset) {
if (state.next) {
this.setNext(false);
}
this.setOffset(minOffset);
offset = minOffset;
}
this.setNext(false);
this.setOffset(minOffset);
offset = minOffset;
}
if (offset < 0) {
if (!state.prev) {
this.setPrev(true);
}
} else if (state.prev) {
this.setPrev(true);
} else {
this.setPrev(false);

@@ -214,5 +213,8 @@ }

setOffset: function setOffset(offset) {
this.setState({
offset: Math.min(0, offset)
});
var target = Math.min(0, offset);
if (this.state.offset !== target) {
this.setState({
offset: target
});
}
},

@@ -237,11 +239,15 @@

setPrev: function setPrev(v) {
this.setState({
prev: v
});
if (this.state.prev !== v) {
this.setState({
prev: v
});
}
},
setNext: function setNext(v) {
this.setState({
next: v
});
if (this.state.next !== v) {
this.setState({
next: v
});
}
}

@@ -248,0 +254,0 @@ });

{
"name": "rc-tabs",
"version": "5.4.1",
"version": "5.4.2",
"description": "tabs ui component for react",

@@ -5,0 +5,0 @@ "keywords": [

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