Skip to content

Commit

Permalink
fix(module: carousel): fix carousel ignore vertical event when set le…
Browse files Browse the repository at this point in the history
…ft or right direction (#581)
  • Loading branch information
Guoyuanqiang authored and fisherspy committed Sep 14, 2019
1 parent 004e4e0 commit abb3a0a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion components/carousel/carousel.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,9 @@ export class CarouselComponent implements AfterViewInit, OnDestroy {
this.touchObject.startY,
touchEvent.getEventTarget(event).pageY
);

if (direction === 0) {
return;
}
const length = this.vertical
? Math.abs(touchEvent.getEventTarget(event).pageY - this.touchObject.startY)
: Math.abs(touchEvent.getEventTarget(event).pageX - this.touchObject.startX);
Expand Down

0 comments on commit abb3a0a

Please sign in to comment.