Socket
Socket
Sign inDemoInstall

rc-steps

Package Overview
Dependencies
Maintainers
4
Versions
74
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rc-steps - npm Package Compare versions

Comparing version 1.5.2 to 1.5.3

52

lib/Steps.js

@@ -39,2 +39,27 @@ 'use strict';

_this._resize = function () {
var w = Math.floor(_reactDom2["default"].findDOMNode(_this).offsetWidth);
if (_this._previousStepsWidth === w) {
return;
}
_this._previousStepsWidth = w;
_this._update();
};
_this._update = function () {
var len = _this.props.children.length - 1;
var tw = 0;
_this._itemsWidth.forEach(function (w) {
tw += w;
});
var dw = Math.floor((_this._previousStepsWidth - tw) / len) - 1;
if (dw <= 0) {
return;
}
_this.setState({
init: true,
tailWidth: dw
});
};
_this._previousStepsWidth = 0;

@@ -113,29 +138,2 @@ _this._itemsWidth = [];

}, {
key: '_resize',
value: function _resize() {
var w = Math.floor(_reactDom2["default"].findDOMNode(this).offsetWidth);
if (this._previousStepsWidth === w) {
return;
}
this._previousStepsWidth = w;
this._update();
}
}, {
key: '_update',
value: function _update() {
var len = this.props.children.length - 1;
var tw = 0;
this._itemsWidth.forEach(function (w) {
tw += w;
});
var dw = Math.floor((this._previousStepsWidth - tw) / len) - 1;
if (dw <= 0) {
return;
}
this.setState({
init: true,
tailWidth: dw
});
}
}, {
key: 'render',

@@ -142,0 +140,0 @@ value: function render() {

{
"name": "rc-steps",
"version": "1.5.2",
"version": "1.5.3",
"description": "steps 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