gbrlsnchs / material2-carousel

A carousel component for Angular using Material
https://gsr.dev/material2-carousel
MIT License
85 stars 118 forks source link

slideHeight input attribute value not working properly #56

Open MrGroot97 opened 4 years ago

MrGroot97 commented 4 years ago

I am just trying to use a fixed height slider with the following configuration <mat-carousel timings="250ms ease-in" [autoplay]="true" interval="50000" color="accent" maxWidth="auto" maintainAspectRatio = false slideHeight="300px" slides=3 [loop]="true" [hideArrows]="false" [hideIndicators]="true" [useKeyboard]="true" [useMouseWheel]="false" orientation="ltr"

it takes proportion value = 25 , and that's true,but why it takes in carousel.component.html <li

carouselSlide

*ngFor="let slide of slidesList" class="carousel-slide" role="option" [style.padding-bottom]="maintainAspectRatio && proportion ? proportion + '%': '0px'" [style.height]="!maintainAspectRatio && slideHeight ? slideHeight : '0px'" (panleft)="onPan($event, carouselSlide)" (panright)="onPan($event, carouselSlide)" (panend)="onPanEnd($event, carouselSlide)" (pancancel)="onPanEnd($event, carouselSlide)"

style.padding-bottom = 25%, although it's expression("maintainAspectRatio && proportion ? proportion + '%': '0px'") not true