diff --git a/CHANGELOG.md b/CHANGELOG.md index 6714a82..3b74fc7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,11 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. + +## [1.3.4](https://github.com/felippenardi/lottie-react-web/compare/v1.2.3...v1.3.4) (2018-07-29) + + + ## [1.2.4](https://github.com/felippenardi/lottie-react-web/compare/v1.2.3...v1.2.4) (2018-07-29) diff --git a/package.json b/package.json index 567a6b6..b1804ac 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "lottie-react-web", - "version": "1.2.4", + "version": "1.3.4", "description": "Lottie wrapper for React on the web.", "repository": { "type": "git", diff --git a/src/index.js b/src/index.js index 3d69f14..c7cb834 100644 --- a/src/index.js +++ b/src/index.js @@ -109,23 +109,12 @@ export default class Lottie extends React.Component { }); } - handleClickToPause = () => { - // The pause() method is for handling pausing by passing a prop isPaused - // This method is for handling the ability to pause by clicking on the animation - if (this.anim.isPaused) { - this.anim.play(); - } else { - this.anim.pause(); - } - } - render() { const { width, height, ariaRole, ariaLabel, - isClickToPauseDisabled, title, } = this.props; @@ -150,8 +139,6 @@ export default class Lottie extends React.Component { ...this.props.style, }; - const onClickHandler = isClickToPauseDisabled ? () => null : this.handleClickToPause; - return ( // Bug with eslint rules https://github.com/airbnb/javascript/issues/1374 // eslint-disable-next-line jsx-a11y/no-static-element-interactions @@ -160,7 +147,6 @@ export default class Lottie extends React.Component { this.el = c; }} style={lottieStyles} - onClick={onClickHandler} title={title} role={ariaRole} aria-label={ariaLabel} @@ -182,7 +168,6 @@ Lottie.propTypes = { direction: PropTypes.number, ariaRole: PropTypes.string, ariaLabel: PropTypes.string, - isClickToPauseDisabled: PropTypes.bool, title: PropTypes.string, style: PropTypes.string, }; @@ -194,6 +179,5 @@ Lottie.defaultProps = { speed: 1, ariaRole: 'button', ariaLabel: 'animation', - isClickToPauseDisabled: false, title: '', }; diff --git a/src/tests/index.js b/src/tests/index.js index e84bd42..91c88ca 100644 --- a/src/tests/index.js +++ b/src/tests/index.js @@ -18,25 +18,6 @@ const defaultOptions = { describe('react-lottie', () => { describe('props', () => { - describe('isClickToPauseDisabled', () => { - it('should prevent handleClickToPause from being called when true', () => { - const component = mount(); - const spy = sinon.stub(); - - component.instance().handleClickToPause = spy; - component.instance().forceUpdate(); - component.find('div').at(0).simulate('click'); - - expect(spy.callCount).to.equal(1); - - spy.reset(); - component.setProps({ isClickToPauseDisabled: true }); - component.find('div').at(0).simulate('click'); - - expect(spy.callCount).to.equal(0); - }); - }); - describe('ariaRole, ariaLabel, and title', () => { it('should set the aria role correctly', () => { const component = shallow(