Skip to content

Commit

Permalink
fix(angular): zoom container custom class
Browse files Browse the repository at this point in the history
  • Loading branch information
vltansky committed Jan 25, 2021
1 parent 7c6c5f1 commit 5d4f11c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/angular/src/swiper.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
[style]="style"
[ngSwitch]="slide.zoom"
>
<div *ngSwitchCase="true" class="swiper-zoom-container">
<div *ngSwitchCase="true" [ngClass]="zoomContainerClass">
<ng-template
[ngTemplateOutlet]="slide.template"
[ngTemplateOutletContext]="{
Expand Down
4 changes: 4 additions & 0 deletions src/angular/src/swiper.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,10 @@ export class SwiperComponent implements OnInit {
return of(this.slides);
}

get zoomContainerClass() {
return typeof this.zoom !== 'boolean' ? this.zoom.containerClass : 'swiper-zoom-container';
}

@HostBinding('class') containerClasses = 'swiper-container';
constructor(
private zone: NgZone,
Expand Down

0 comments on commit 5d4f11c

Please sign in to comment.