react-resizable-box
Advanced tools
Comparing version 0.3.1 to 0.3.2
@@ -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 })` |
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
21748
310