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

react-resizable-box

Package Overview
Dependencies
Maintainers
1
Versions
52
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-resizable-box - npm Package Compare versions

Comparing version 0.3.1 to 0.3.2

21

lib/index.js

@@ -35,4 +35,2 @@ 'use strict';

// alert('hi from rrb')
var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(Risizable).call(this, props));

@@ -59,5 +57,3 @@

}
//TODO: autoSize: PropTypes.bool
_createClass(Risizable, [{

@@ -114,3 +110,3 @@ key: 'componentDidMount',

}
var rect = this.refs.resizable.getBoundingClientRect();
var resizable = this.refs.resizable;
this.props.onResize(direction, {

@@ -120,4 +116,4 @@ width: newWidth || this.state.width,

}, {
width: rect.width,
height: rect.height
width: resizable.clientWidth,
height: resizable.clientHeight
});

@@ -135,3 +131,3 @@ }

if (!isActive) return;
var rect = this.refs.resizable.getBoundingClientRect();
var resizable = this.refs.resizable;
this.props.onResizeStop(direction, {

@@ -141,4 +137,4 @@ width: width,

}, {
width: rect.width,
height: rect.height
width: resizable.clientWidth,
height: resizable.clientHeight
});

@@ -250,5 +246,4 @@ this.setState({ isActive: false });

maxWidth: _react.PropTypes.number,
maxHeight: _react.PropTypes.number,
fullWidth: _react.PropTypes.bool,
fullHeight: _react.PropTypes.bool };
maxHeight: _react.PropTypes.number
};
Risizable.defaultProps = {

@@ -255,0 +250,0 @@ onResizeStart: function onResizeStart() {

{
"name": "react-resizable-box",
"version": "0.3.1",
"version": "0.3.2",
"description": "",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

@@ -122,9 +122,9 @@ # react-resizable-box

Calls when resizable component resize.
Calls back with (`direction: string`, `styleSize: object`, `boundingClientRect: object`)
Calls back with (`direction: string`, `styleSize: object`, `clientSize: object`)
- direction: `x` or `y` or `xy`
- styleSize: `{ width, height }`
- this argument is {style.width, style.height} resizable component(`div` element).
- boundingClientRect: `{ width`, height }`
- this argument is `width` and `height` of `resizable.getBoundingClientRect()`.
- getComputedStyleSize: `{ width, height }`
- this argument is {width, height} of getComputedStyle.
- clientSize: `{ width`, height }`
- this argument is `clientWidth` and `clientHeight`.

@@ -135,9 +135,9 @@ For example, when `<Resizable width={100} height={200} style={{ padding: '20px'}} onResize={...} />` mounted and resize 'x', this callback is called with `('x', { width: 100, height: 200 }, { width: 140, height: 240 })`

Calls back with (`direction: string`, `styleSize: object`, `boundingClientRect: object`)
Calls back with (`direction: string`, `styleSize: object`, `clientSize: object`)
- direction: `x` or `y` or `xy`
- styleSize: `{ width, height }`
- this argument is {style.width, style.height} resizable component(`div` element).
- boundingClientRect: `{ width`, height }`
- this argument is `width` and `height` of `resizable.getBoundingClientRect()`.
- getComputedStyleSize: `{ width, height }`
- this argument is {width, height} of getComputedStyle.
- clientSize: `{ width`, height }`
- this argument is `clientWidth` and `clientHeight`.

@@ -144,0 +144,0 @@ For example, when `<Resizable width={100} height={200} style={{ padding: '20px'}} onResize={...} />` mounted and resize 'x', this callback is called with `('x', { width: 100, height: 200 }, { width: 140, height: 240 })`

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