@exadel/esl
Version:
Exadel Smart Library (ESL) is the lightweight custom elements library that provide a set of super-flexible components
24 lines (23 loc) • 789 B
JavaScript
/** Abstract base class for all {@link ESLCarousel} action events */
export class ESLCarouselActionEvent extends Event {
constructor() {
super(...arguments);
this.final = false;
}
/** @returns first index of before sate */
get indexBefore() {
return this.indexesBefore[0];
}
/** @returns first index of after state */
get indexAfter() {
return this.indexesAfter[0];
}
/** @returns list of slides that are active before the change */
get $slidesBefore() {
return this.indexesBefore.map((index) => this.target.slideAt(index));
}
/** @returns list of slides that are active after the change */
get $slidesAfter() {
return this.indexesAfter.map((index) => this.target.slideAt(index));
}
}