Skip to content

Commit

Permalink
Fixed #8833 - Carousel doesn't use 'responsiveOptions' on init
Browse files Browse the repository at this point in the history
  • Loading branch information
yigitfindikli committed Nov 26, 2020
1 parent 34ba98d commit d1eebcb
Showing 1 changed file with 17 additions and 8 deletions.
25 changes: 17 additions & 8 deletions src/app/components/carousel/carousel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -200,17 +200,26 @@ export class Carousel implements AfterContentInit {
}
}

if (simpleChange.numVisible && this.isCreated) {
if (this.responsiveOptions) {
this.defaultNumVisible = this.numVisible;
}
if (this.isCreated) {

if (simpleChange.numVisible) {
if (this.responsiveOptions) {
this.defaultNumVisible = this.numVisible;
}

if (this.isCircular()) {
this.setCloneItems();
if (this.isCircular()) {
this.setCloneItems();
}

this.createStyle();
this.calculatePosition();
}

this.createStyle();
this.calculatePosition();
if (simpleChange.numScroll) {
if (this.responsiveOptions) {
this.defaultNumScroll = this.numScroll;
}
}
}
}

Expand Down

0 comments on commit d1eebcb

Please sign in to comment.