react-lottie
Advanced tools
Comparing version 0.0.5 to 0.0.6
@@ -5,2 +5,7 @@ # Change Log | ||
<a name="0.0.6"></a> | ||
## [0.0.6](https://github.com/chenqingspring/react-lottie/compare/v0.0.5...v0.0.6) (2017-04-22) | ||
<a name="0.0.5"></a> | ||
@@ -7,0 +12,0 @@ ## [0.0.5](https://github.com/chenqingspring/react-lottie/compare/v0.0.4...v0.0.5) (2017-04-22) |
@@ -67,4 +67,19 @@ 'use strict'; | ||
}; | ||
_bodymovin2.default.loadAnimation(this.options); | ||
this.amin = _bodymovin2.default.loadAnimation(this.options); | ||
} | ||
}, { | ||
key: 'componentDidUpdate', | ||
value: function componentDidUpdate() { | ||
this.props.isStopped ? this.stop() : this.play(); | ||
} | ||
}, { | ||
key: 'stop', | ||
value: function stop() { | ||
this.amin.stop(); | ||
} | ||
}, { | ||
key: 'play', | ||
value: function play() { | ||
this.amin.play(); | ||
} | ||
}]); | ||
@@ -80,3 +95,8 @@ return Lottie; | ||
height: _react2.default.PropTypes.number, | ||
width: _react2.default.PropTypes.number | ||
width: _react2.default.PropTypes.number, | ||
isStopped: _react2.default.PropTypes.bool | ||
}; | ||
Lottie.defaultProps = { | ||
isStopped: false | ||
}; |
{ | ||
"name": "react-lottie", | ||
"version": "0.0.5", | ||
"version": "0.0.6", | ||
"description": "lottie animation view for React", | ||
@@ -19,3 +19,4 @@ "repository": { | ||
"storybook": "start-storybook -p 9010", | ||
"publish-storybook": "bash .scripts/publish_storybook.sh" | ||
"publish-storybook": "bash .scripts/publish_storybook.sh", | ||
"postpublish": "npm run publish-storybook" | ||
}, | ||
@@ -22,0 +23,0 @@ "devDependencies": { |
Sorry, the diff of this file is not supported yet
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
51438
121