Skip to content

Commit

Permalink
Remove auto fix
Browse files Browse the repository at this point in the history
  • Loading branch information
bokuweb committed Apr 28, 2017
1 parent 6f7a154 commit e1bd08f
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 16 deletions.
10 changes: 3 additions & 7 deletions docs/dist/bundle.js
Expand Up @@ -18,7 +18,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
exports.default = function () {
return _react2.default.createElement(
'div',
null,
{ style: { width: '900px', background: '#ccc', marginLeft: '100px' } },
_react2.default.createElement(
_src2.default,
{
Expand All @@ -27,8 +27,7 @@ exports.default = function () {
height: '300',
minWidth: '240',
minHeight: '120',
maxWidth: '800',
maxHeight: '600'
bounds: 'parent'
},
_react2.default.createElement(
'span',
Expand Down Expand Up @@ -22929,10 +22928,7 @@ var Resizable = function (_Component) {
newHeight = snap(newHeight, this.props.grid[1]);
}

this.setState({
width: width !== 'auto' ? newWidth : 'auto',
height: height !== 'auto' ? newHeight : 'auto'
});
this.setState({ width: newWidth, height: newHeight });
var delta = {
width: newWidth - original.width,
height: newHeight - original.height
Expand Down
4 changes: 2 additions & 2 deletions docs/index.html
Expand Up @@ -33,13 +33,13 @@
overflow: hidden;
color: #fff;
line-height: 100%;
display: -webkit-flex;
/*display: -webkit-flex;
display: flex;
-webkit-align-items: center;
align-items: center;
-webkit-justify-content:
justify-content: center;
margin: 0 auto;
margin: 0 auto;*/
padding: 4px;
}
.item span{
Expand Down
5 changes: 2 additions & 3 deletions docs/src/example.js
Expand Up @@ -2,15 +2,14 @@ import React from 'react';
import Resizable from '../../src';

export default () => (
<div>
<div style={{ width: '900px', background: '#ccc', marginLeft: '100px' }}>
<Resizable
className="item"
width="280"
height="300"
minWidth="240"
minHeight="120"
maxWidth="800"
maxHeight="600"
bounds="parent"
>
<span>
Resize me!!<br />
Expand Down
5 changes: 1 addition & 4 deletions src/index.js
Expand Up @@ -318,10 +318,7 @@ export default class Resizable extends Component {
newHeight = snap(newHeight, this.props.grid[1]);
}

this.setState({
width: width !== 'auto' ? newWidth : 'auto',
height: height !== 'auto' ? newHeight : 'auto',
});
this.setState({ width: newWidth, height: newHeight });
const delta = {
width: newWidth - original.width,
height: newHeight - original.height,
Expand Down

0 comments on commit e1bd08f

Please sign in to comment.