Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update ngu-carousel.ts #323

Merged
merged 1 commit into from
Jan 26, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 21 additions & 2 deletions projects/ngu-carousel/src/lib/ngu-carousel/ngu-carousel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,30 @@ export class Touch {
velocity: number;
}

export class Transfrom {
// Interface is declared to prevent property-minification
// See: https://github.com/uiuniversal/ngu-carousel/issues/322
declare interface TransformInterface {
xs: number;
sm: number;
md: number;
lg: number;
xl?: number;
all: number;
}

export class Transfrom implements TransformInterface {
public xl? = 0;
constructor(public xs = 0, public sm = 0, public md = 0, public lg = 0, public all = 0) {}
}

// Interface is declared to prevent property-minification
// See: https://github.com/uiuniversal/ngu-carousel/issues/322
declare interface BreakpointsInterface {
sm: number;
md: number;
lg: number;
xl: number;
}

/**
* Default values
Expand All @@ -70,7 +89,7 @@ export class Transfrom {
* Bootstrap values:
* {sm: 576, md: 768, lg: 992, xl: 1200}
*/
export class Breakpoints {
export class Breakpoints implements BreakpointsInterface {
constructor(public sm = 768, public md = 992, public lg = 1200, public xl = 1200) {}
}

Expand Down