Skip to content

Commit

Permalink
fix(module:carousel): fix last panel bug
Browse files Browse the repository at this point in the history
fix(module:carousel): fix last panel bug
  • Loading branch information
Guoyuanqiang committed Oct 10, 2018
1 parent 9b8f3da commit 2c5cd92
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/carousel/carousel.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ export class CarouselComponent implements AfterViewInit, OnDestroy {
v.top = this.vertical ? (this._nodeArr.length - 1) * this._rationWidth : 0;
}
} else if (index === this._nodeArr.length - 2 && 0 === tempIndex) {
v.left = 0;
v.left = this.vertical ? 0 : this._nodeArr.length * this._rationWidth;
v.top = this.vertical ? this._nodeArr.length * this._rationWidth : 0;
} else if (index === this._nodeArr.length - 1 && tempIndex === 1 && this.autoplay) {
v.left = this.vertical ? 0 : (this._nodeArr.length + tempIndex) * this._rationWidth;
Expand Down

0 comments on commit 2c5cd92

Please sign in to comment.