Skip to content
This repository has been archived by the owner on Aug 6, 2022. It is now read-only.

Commit

Permalink
Removed unnecessary swiper breakpoint interface
Browse files Browse the repository at this point in the history
  • Loading branch information
sconix committed Nov 30, 2017
1 parent a9cd330 commit 88e8666
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 41 deletions.
33 changes: 4 additions & 29 deletions example/src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,35 +12,10 @@ import { AppComponent } from './app.component';
const DEFAULT_SWIPER_CONFIG: SwiperConfigInterface = {
observer: true,
direction: 'horizontal',
slidesPerView: 4,
spaceBetween: 40,
breakpoints: {
1024: {
slidesPerView: 4,
spaceBetween: 40,
},
767: {
slidesPerView: 3,
spaceBetween: 20,
},
479: {
slidesPerView: 2,
spaceBetween: 10

}
},
centeredSlides: true,
keyboard: true,
mousewheel: false,
freeMode: false,
speed: 1000,
autoplay: {
delay: 2000,
stopOnLast: false
},
effect: 'slide',
grabCursor: true,
loop: true,
threshold: 50,
spaceBetween: 5,
slidesPerView: 1,
centeredSlides: true
};

@NgModule({
Expand Down
4 changes: 1 addition & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ export {

SwiperConfig,
SwiperConfigInterface,

SwiperBreakpointInterface,
SwiperBreakpointsInterface,

SwiperA11YInterface,
Expand All @@ -17,10 +15,10 @@ export {
SwiperVirtualInterface,
SwiperAutoplayInterface,
SwiperScrollbarInterface,
SwiperMousewheelInterface,
SwiperControllerInterface,
SwiperNavigationInterface,
SwiperPaginationInterface,
SwiperMousewheelInterface,
SwiperHashNavigationInterface,

SwiperFadeEffectInterface,
Expand Down
13 changes: 4 additions & 9 deletions src/lib/swiper.interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -182,10 +182,10 @@ export interface SwiperConfigInterface {
virtual?: boolean | SwiperVirtualInterface,
autoplay?: boolean | SwiperAutoplayInterface,
scrollbar?: boolean | SwiperScrollbarInterface,
mousewheel?: boolean | SwiperMousewheelInterface,
controller?: boolean | SwiperControllerInterface,
navigation?: boolean | SwiperNavigationInterface,
pagination?: boolean | SwiperPaginationInterface,
mousewheel?: boolean | SwiperMousewheelInterface,
hashNavigation?: boolean | SwiperHashNavigationInterface
}

Expand Down Expand Up @@ -314,14 +314,8 @@ export interface SwiperCoverflowEffectInterface {
slideShadows?: boolean
}

export interface SwiperBreakpointInterface {
spaceBetween?: number,
slidesPerView?: number,
slidesPerGroup?: number
}

export interface SwiperBreakpointsInterface {
[size: number]: SwiperBreakpointInterface
[size: number]: SwiperConfigInterface
}

export class SwiperConfig implements SwiperConfigInterface {
Expand Down Expand Up @@ -453,10 +447,10 @@ export class SwiperConfig implements SwiperConfigInterface {
public virtual: boolean | any;
public autoplay: boolean | any;
public scrollbar: boolean | any;
public mousewheel: boolean | any;
public controller: boolean | any;
public navigation: boolean | any;
public pagination: boolean | any;
public mousewheel: boolean | any;
public hashNavigation: boolean | any;

constructor(config: SwiperConfigInterface = {}) {
Expand Down Expand Up @@ -484,6 +478,7 @@ export type SwiperRenderSlideFunction = (index: number) => HTMLElement;
export type SwiperRenderExternalFunction = (data: any) => void;

export type SwiperRenderCustomFunction = (current: number, total: number) => string;

export type SwiperRenderBulletFunction = (index: number, className: string) => string;
export type SwiperRenderFractionFunction = (currentClass: string, totalClass: string) => string;
export type SwiperRenderProgressbarFunction = (progressbarClass: string) => string;

0 comments on commit 88e8666

Please sign in to comment.