Skip to content

Commit 4a81da5

Browse files
committed
Rebuild
1 parent a7ee6b5 commit 4a81da5

1 file changed

Lines changed: 10 additions & 51 deletions

File tree

dist/bundle.js

Lines changed: 10 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -419,40 +419,6 @@ function _possibleConstructorReturn(self, call) { if (!self) { throw new Referen
419419

420420
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
421421

422-
/*:: type Axis = 'both' | 'x' | 'y' | 'none';*/
423-
/*:: type Position = {
424-
425-
};*/
426-
/*:: type State = {
427-
resizing: boolean,
428-
width: number, height: number,
429-
slackW: number, slackH: number
430-
};*/
431-
/*:: type DragCallbackData = {
432-
node: HTMLElement,
433-
x: number, y: number,
434-
deltaX: number, deltaY: number,
435-
lastX: number, lastY: number
436-
};*/
437-
/*:: type ResizeCallbackData = {
438-
node: HTMLElement,
439-
size: {width: number, height: number}
440-
};*/
441-
/*:: export type Props = {
442-
children: React.Element<any>,
443-
width: number,
444-
height: number,
445-
handleSize: [number, number],
446-
lockAspectRatio: boolean,
447-
axis: Axis,
448-
minConstraints: [number, number],
449-
maxConstraints: [number, number],
450-
onResizeStop?: ?(e: SyntheticEvent, data: ResizeCallbackData) => any,
451-
onResizeStart?: ?(e: SyntheticEvent, data: ResizeCallbackData) => any,
452-
onResize?: ?(e: SyntheticEvent, data: ResizeCallbackData) => any,
453-
draggableOpts?: ?Object
454-
};*/
455-
456422
var Resizable = function (_React$Component) {
457423
_inherits(Resizable, _React$Component);
458424

@@ -472,7 +438,7 @@ var Resizable = function (_React$Component) {
472438
}, _temp), _possibleConstructorReturn(_this, _ret);
473439
}
474440

475-
Resizable.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps /*: Object*/) {
441+
Resizable.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
476442
// If parent changes height/width, set that in our state.
477443
if (!this.state.resizing && (nextProps.width !== this.props.width || nextProps.height !== this.props.height)) {
478444
this.setState({
@@ -482,7 +448,7 @@ var Resizable = function (_React$Component) {
482448
}
483449
};
484450

485-
Resizable.prototype.lockAspectRatio = function lockAspectRatio(width /*: number*/, height /*: number*/, aspectRatio /*: number*/) /*: [number, number]*/ {
451+
Resizable.prototype.lockAspectRatio = function lockAspectRatio(width, height, aspectRatio) {
486452
height = width / aspectRatio;
487453
width = height * aspectRatio;
488454
return [width, height];
@@ -491,7 +457,7 @@ var Resizable = function (_React$Component) {
491457
// If you do this, be careful of constraints
492458

493459

494-
Resizable.prototype.runConstraints = function runConstraints(width /*: number*/, height /*: number*/) /*: [number, number]*/ {
460+
Resizable.prototype.runConstraints = function runConstraints(width, height) {
495461
var _ref = [this.props.minConstraints, this.props.maxConstraints],
496462
min = _ref[0],
497463
max = _ref[1];
@@ -546,10 +512,10 @@ var Resizable = function (_React$Component) {
546512
*/
547513

548514

549-
Resizable.prototype.resizeHandler = function resizeHandler(handlerName /*: string*/) /*: Function*/ {
515+
Resizable.prototype.resizeHandler = function resizeHandler(handlerName) {
550516
var _this2 = this;
551517

552-
return function (e /*: SyntheticEvent | MouseEvent*/, _ref2) {
518+
return function (e, _ref2) {
553519
var node = _ref2.node,
554520
deltaX = _ref2.deltaX,
555521
deltaY = _ref2.deltaY;
@@ -598,7 +564,7 @@ var Resizable = function (_React$Component) {
598564
};
599565
};
600566

601-
Resizable.prototype.render = function render() /*: React.Element<any>*/ {
567+
Resizable.prototype.render = function render() {
602568
// eslint-disable-next-line no-unused-vars
603569
var _props = this.props,
604570
children = _props.children,
@@ -1028,14 +994,7 @@ function _possibleConstructorReturn(self, call) { if (!self) { throw new Referen
1028994

1029995
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
1030996

1031-
/*:: import type {Props as ResizableProps} from './Resizable';*/
1032-
/*:: type State = {width: number, height: number};*/
1033-
/*:: type Size = {width: number, height: number};*/
1034-
1035-
1036997
// An example use of Resizable.
1037-
/*:: type ResizeData = {element: Element, size: Size};*/
1038-
1039998
var ResizableBox = function (_React$Component) {
1040999
_inherits(ResizableBox, _React$Component);
10411000

@@ -1051,7 +1010,7 @@ var ResizableBox = function (_React$Component) {
10511010
return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.state = {
10521011
width: _this.props.width,
10531012
height: _this.props.height
1054-
}, _this.onResize = function (e /*: Event*/, _ref) {
1013+
}, _this.onResize = function (e, _ref) {
10551014
var element = _ref.element,
10561015
size = _ref.size;
10571016
var width = size.width,
@@ -1069,7 +1028,7 @@ var ResizableBox = function (_React$Component) {
10691028
}, _temp), _possibleConstructorReturn(_this, _ret);
10701029
}
10711030

1072-
ResizableBox.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps /*: ResizableProps*/) {
1031+
ResizableBox.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
10731032
if (nextProps.width !== this.props.width || nextProps.height !== this.props.height) {
10741033
this.setState({
10751034
width: nextProps.width,
@@ -1078,7 +1037,7 @@ var ResizableBox = function (_React$Component) {
10781037
}
10791038
};
10801039

1081-
ResizableBox.prototype.render = function render() /*: React.Element<any>*/ {
1040+
ResizableBox.prototype.render = function render() {
10821041
// Basic wrapper around a Resizable instance.
10831042
// If you use Resizable directly, you are responsible for updating the child component
10841043
// with a new width and height.
@@ -1143,7 +1102,7 @@ var _react2 = _interopRequireDefault(_react);
11431102
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11441103

11451104
// React.addons.cloneWithProps look-alike that merges style & className.
1146-
module.exports = function cloneElement(element /*: React.Element<any>*/, props /*: Object*/) /*: React.Element<any>*/ {
1105+
module.exports = function cloneElement(element, props) {
11471106
if (props.style && element.props.style) {
11481107
props.style = _extends({}, element.props.style, props.style);
11491108
}

0 commit comments

Comments
 (0)