diff --git a/package.json b/package.json index 870844e..47762be 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rc-banner-anim", - "version": "0.2.13", + "version": "0.2.14", "description": "banner-anim animation component for react", "keywords": [ "react", diff --git a/src/Arrow.jsx b/src/Arrow.jsx index 61bc666..57e0aa2 100644 --- a/src/Arrow.jsx +++ b/src/Arrow.jsx @@ -22,7 +22,7 @@ class Arrow extends Component { const props = assign({}, this.props); [ `arrowType`, `next`, `prev`, - `elemHeight`, 'component', 'default', + `elemHeight`, 'component', 'default', 'prefixCls', ].forEach(key => delete props[key]); props.className = className; props.onClick = this.onClick; diff --git a/src/BannerAnim.jsx b/src/BannerAnim.jsx index 67af8ac..621eed9 100644 --- a/src/BannerAnim.jsx +++ b/src/BannerAnim.jsx @@ -100,9 +100,9 @@ class BannerAnim extends Component { let angle = Math.round(r * 180 / Math.PI); angle = angle < 0 ? 360 - Math.abs(angle) : angle; if ((angle >= 0 && angle <= 45 || angle >= 315) && differX > this.state.domRect.width * 0.1) { - this.next(); - } else if (angle >= 135 && angle <= 225 && differX < -this.state.domRect.width * 0.1) { this.prev(); + } else if (angle >= 135 && angle <= 225 && differX < -this.state.domRect.width * 0.1) { + this.next(); } delete this.mouseXY; } diff --git a/src/Thumb.jsx b/src/Thumb.jsx index 146a402..3ec14b9 100644 --- a/src/Thumb.jsx +++ b/src/Thumb.jsx @@ -35,7 +35,8 @@ class Thumb extends Component { return React.cloneElement(item, props); }); const props = assign({}, this.props); - [`length`, `thumbClick`, `active`, 'default', 'component'].forEach(key => delete props[key]); + [`length`, `thumbClick`, `active`, 'default', 'component', 'prefixCls'] + .forEach(key => delete props[key]); props.className = className; return React.createElement(this.props.component, props,