diff --git a/package.json b/package.json index 3457ba3..cbc7195 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-swipe", - "version": "2.0.11", + "version": "2.1.0", "description": "Brad Birdsall's Swipe.js, as a React component", "homepage": "https://github.com/jed/react-swipe", "keywords": [ @@ -27,11 +27,11 @@ "prepublish": "npm run build" }, "dependencies": { - "react": "0.12.x", + "react": "0.13.x", "swipe-js-iso": ">=2.0.0" }, "peerDependencies": { - "react": "0.12.x", + "react": "0.13.x", "swipe-js-iso": ">=2.0.0" } } diff --git a/react-swipe.js b/react-swipe.js index 5dd4055..8ab155f 100644 --- a/react-swipe.js +++ b/react-swipe.js @@ -47,7 +47,7 @@ componentDidMount: function () { if (this.isMounted()) { - this.swipe = Swipe(this.getDOMNode(), this.props); + this.swipe = Swipe(React.findDOMNode(this), this.props); } }, diff --git a/react-swipe.min.js b/react-swipe.min.js index 8c2df49..72efaf6 100644 --- a/react-swipe.min.js +++ b/react-swipe.min.js @@ -1 +1 @@ -!function(e,o){"undefined"!=typeof module&&module.exports?module.exports=o(require("react/addons"),require("swipe-js-iso")):e.ReactSwipe=o(e.React,e.Swipe)}(this,function(e,o){var i={container:{overflow:"hidden",visibility:"hidden",position:"relative"},wrapper:{overflow:"hidden",position:"relative"},child:{"float":"left",width:"100%",position:"relative"}},t=e.createClass({propTypes:{startSlide:e.PropTypes.number,slideToIndex:e.PropTypes.number,shouldUpdate:e.PropTypes.func,speed:e.PropTypes.number,auto:e.PropTypes.number,continuous:e.PropTypes.bool,disableScroll:e.PropTypes.bool,stopPropagation:e.PropTypes.bool,callback:e.PropTypes.func,transitionEnd:e.PropTypes.func},componentDidMount:function(){this.isMounted()&&(this.swipe=o(this.getDOMNode(),this.props))},componentDidUpdate:function(){(this.props.slideToIndex||0===this.props.slideToIndex)&&this.swipe.slide(this.props.slideToIndex)},componentWillUnmount:function(){this.swipe.kill(),delete this.swipe},shouldComponentUpdate:function(e){return this.props.slideToIndex!==e.slideToIndex||"undefined"!=typeof this.props.shouldUpdate&&this.props.shouldUpdate(e)},render:function(){return e.createElement("div",e.__spread({},this.props,{style:i.container}),e.createElement("div",{style:i.wrapper},e.Children.map(this.props.children,function(o){return e.addons.cloneWithProps(o,{style:i.child})})))}});return t}); \ No newline at end of file +!function(e,o){"undefined"!=typeof module&&module.exports?module.exports=o(require("react/addons"),require("swipe-js-iso")):e.ReactSwipe=o(e.React,e.Swipe)}(this,function(e,o){var i={container:{overflow:"hidden",visibility:"hidden",position:"relative"},wrapper:{overflow:"hidden",position:"relative"},child:{"float":"left",width:"100%",position:"relative"}},t=e.createClass({propTypes:{startSlide:e.PropTypes.number,slideToIndex:e.PropTypes.number,shouldUpdate:e.PropTypes.func,speed:e.PropTypes.number,auto:e.PropTypes.number,continuous:e.PropTypes.bool,disableScroll:e.PropTypes.bool,stopPropagation:e.PropTypes.bool,callback:e.PropTypes.func,transitionEnd:e.PropTypes.func},componentDidMount:function(){this.isMounted()&&(this.swipe=o(e.findDOMNode(this),this.props))},componentDidUpdate:function(){(this.props.slideToIndex||0===this.props.slideToIndex)&&this.swipe.slide(this.props.slideToIndex)},componentWillUnmount:function(){this.swipe.kill(),delete this.swipe},shouldComponentUpdate:function(e){return this.props.slideToIndex!==e.slideToIndex||"undefined"!=typeof this.props.shouldUpdate&&this.props.shouldUpdate(e)},render:function(){return e.createElement("div",e.__spread({},this.props,{style:i.container}),e.createElement("div",{style:i.wrapper},e.Children.map(this.props.children,function(o){return e.addons.cloneWithProps(o,{style:i.child})})))}});return t}); \ No newline at end of file