Skip to content

Commit

Permalink
fix touch end prev and next opposite
Browse files Browse the repository at this point in the history
  • Loading branch information
jljsj33 committed Jul 8, 2016
1 parent 174db86 commit 744007a
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion src/Arrow.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions src/BannerAnim.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
3 changes: 2 additions & 1 deletion src/Thumb.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 744007a

Please sign in to comment.