ngx-carousel-ease
Version:
ngx-carousel-ease is a versatile Angular library providing a feature-rich, simple, and performant carousel component. This library supports infinite and responsive mode, mouse and touch event. Attention has been put to accessibility, performance, and frie
83 lines (82 loc) • 3.82 kB
TypeScript
import { ChangeDetectorRef } from '@angular/core';
import { Carousel } from './carousel';
import { CarouselService } from './carousel.service';
import { CommunSlider } from './communSlider';
export declare class FiniteSlider extends CommunSlider {
constructor(carousel: Carousel, responsive: boolean, slideToScroll: number, LIMIT_AUTO_SLIDE: number, strechingLimit: number, autoSlide: boolean, animationTimingFn: string, animationTimingMs: number, enableMouseDrag: boolean, enableTouch: boolean, autoPlay: boolean, autoPlayInterval: number, autoPlayAtStart: boolean, playDirection: string, autoplaySlideToScroll: number, carouselService: CarouselService, cd: ChangeDetectorRef);
initProperties(): void;
/**
* In finite carousel, clear autoPlay interval if limits are reached.
*/
disableAutoPlayBtn(): void;
/**
* Fired at drag start
* Instantiate property of the starting drag point on the X axis. Used to compute the translation.
* Disabling the transition while applying the transformation because of the attached animation.
*/
dragStart(event: MouseEvent | TouchEvent): void;
/**
* Fired at drag end
* If limits reached (start or end), put back to the current slide. Updates previous translation.
*/
dragStop(event: MouseEvent | TouchEvent): void;
/**
* Fired at dragging
* Compute the translation, change the slide number, update the direction.
*/
dragMove(event: MouseEvent | TouchEvent): void;
strechingEffect(): boolean;
/**
* Responsible for changing slide number and updating the limits.
* In finite mode, if all slides visible on one window or end of carousel, early return to not trigger change event.
*/
modifyCurrentSlide(): void;
endOfCarousel(): boolean;
/**
* Auto slide card if option enabled, applied on both directions.
* Prevents auto slide on limits in finite mode (if streching < limit auto slide).
* If only one slide is displayed (slideToShow === 1), the width of the slide corresponds to the window's width (a dot). Hence, taking the min between the two.
* In non responsive and non infinite, there is possibly an offset of the current limit.
*/
autoSlider(): void;
/**
* Decrease limit (movement to the left)
* Exception: if not responsive (card offset) and finite carousel, the next limit is at the maximum (the end of the carousel)
*/
decreaseLimits(): void;
/**
* Increase limit on basis of previous computed limits (movement to the right)
* Schema: || previous | current || next
* Exception: if not responsive (card offset) and finite carousel, the next limit is at the maximum (the end of the carousel)
*/
increaseLimits(): void;
/**
* Previous button navigation
*/
prev(slides?: number): void;
/**
* Relaunch autoPlay if not disabled.
* Restart only if started (playActive). Play button disabled when limits reached (finite carousel).
*/
relaunchAutoPlay(): void;
defineAutoPlayDirection(): void;
/**
* Next button navigation
*/
next(slides?: number): void;
/**
* Navigation with bullet points
* Update values accordingly.
*/
goTo(bullet: number): void;
/**
* Exception: if only one window (numberDots === 1), update the accumulatedSlide to let the transformation occurs, but currentSlide should stay at 0.
*/
changeSlideNumber(step: number): void;
finiteChangeSlideNumber(step: number): void;
/**
* Compute transformation that will be applied on basis of the provided slide number
* Exception: if not responsive (card offset) and finite carousel, the next limit is the end of the carousel
*/
computeTransformation(slide: number): void;
}