From 69753b72b1b7d7edf13c206e9bfba2753bd60ac6 Mon Sep 17 00:00:00 2001 From: bombergio Date: Mon, 24 Feb 2020 17:34:46 +0100 Subject: [PATCH] Fixing broken loop after migration to v9.0.0 (#257) --- package.json | 2 +- projects/lib/src/lib/swiper.component.ts | 3 +++ projects/lib/src/lib/swiper.directive.ts | 3 +++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 816267d..c6523b1 100644 --- a/package.json +++ b/package.json @@ -48,7 +48,7 @@ "@angular/platform-browser-dynamic": "^9.0.0", "core-js": "^3.6.0", "rxjs": "^6.5.0", - "swiper": "^5.3.0", + "swiper": "^5.3.1", "zone.js": "^0.10.0" }, "devDependencies": { diff --git a/projects/lib/src/lib/swiper.component.ts b/projects/lib/src/lib/swiper.component.ts index a418414..5b4eeaf 100644 --- a/projects/lib/src/lib/swiper.component.ts +++ b/projects/lib/src/lib/swiper.component.ts @@ -112,6 +112,9 @@ export class SwiperComponent implements AfterViewInit, OnDestroy { @Output('slideChangeTransitionEnd' ) S_SLIDECHANGETRANSITIONEND = new EventEmitter(); @Output('slideChangeTransitionStart' ) S_SLIDECHANGETRANSITIONSTART = new EventEmitter(); + @Output('beforeLoopFix' ) S_BEFORELOOPFIX = new EventEmitter(); + @Output('loopFix' ) S_LOOPFIX = new EventEmitter(); + constructor(private zone: NgZone, private cdRef: ChangeDetectorRef, @Inject(PLATFORM_ID) private platformId: Object, @Optional() @Inject(SWIPER_CONFIG) private defaults: SwiperConfigInterface) {} diff --git a/projects/lib/src/lib/swiper.directive.ts b/projects/lib/src/lib/swiper.directive.ts index 28845b9..f2539d3 100644 --- a/projects/lib/src/lib/swiper.directive.ts +++ b/projects/lib/src/lib/swiper.directive.ts @@ -94,6 +94,9 @@ export class SwiperDirective implements AfterViewInit, OnDestroy, DoCheck, OnCha @Output('slideNextTransitionStart' ) S_SLIDENEXTTRANSITIONSTART = new EventEmitter(); @Output('slideChangeTransitionEnd' ) S_SLIDECHANGETRANSITIONEND = new EventEmitter(); @Output('slideChangeTransitionStart' ) S_SLIDECHANGETRANSITIONSTART = new EventEmitter(); + + @Output('beforeLoopFix' ) S_BEFORELOOPFIX = new EventEmitter(); + @Output('loopFix' ) S_LOOPFIX = new EventEmitter(); constructor(@Inject(PLATFORM_ID) private platformId: Object, private zone: NgZone, private elementRef: ElementRef, private differs: KeyValueDiffers,