|
|
|
@ -131,8 +131,7 @@ export class CarouselComponent<T> implements OnInit, AfterViewInit {
|
|
|
|
|
setIndex(slideIndex: number) {
|
|
|
|
|
this.current = slideIndex;
|
|
|
|
|
|
|
|
|
|
for(let i = -this.numExtraPrev(); i <= this.numExtraNext(); i++) {
|
|
|
|
|
console.log("adding slide:", this.current + i);
|
|
|
|
|
for(let i = Math.max(-this.numExtraPrev(), 0); i <= this.numExtraNext(); i++) {
|
|
|
|
|
this.visibleSlides?.push({
|
|
|
|
|
index: this.current + i,
|
|
|
|
|
hasBeenVisible: false,
|
|
|
|
|