forked from vimalavinisha/angular2-image-popup
-
-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
Showing
4 changed files
with
112 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 4 additions & 1 deletion
5
angular-modal-gallery/src/components/modal-gallery/modal-gallery.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
59 changes: 59 additions & 0 deletions
59
angular-modal-gallery/src/interfaces/plain-gallery-config.interface.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
/** | ||
* Interface `PlainGalleryConfig` to configure | ||
* plain-gallery features. | ||
*/ | ||
export interface PlainGalleryConfig { | ||
strategy: PlainGalleryStrategy; | ||
layout: PlainGalleryLayout; | ||
size: Size; | ||
} | ||
|
||
export class PlainGalleryLayout { | ||
breakConfig: BreakConfig; | ||
|
||
constructor(breakConfig: BreakConfig) { | ||
this.breakConfig = breakConfig; | ||
} | ||
} | ||
|
||
export class LineLayout extends PlainGalleryLayout { | ||
reverse: boolean; | ||
|
||
constructor(breakConfig: BreakConfig, reverse: boolean) { | ||
super(breakConfig); | ||
this.reverse = reverse; | ||
} | ||
} | ||
|
||
export class GridLayout extends PlainGalleryLayout { | ||
rows: number; | ||
cols: number; | ||
|
||
constructor(breakConfig: BreakConfig, rows: number, cols: number) { | ||
super(breakConfig); | ||
this.rows = rows; | ||
this.cols = cols; | ||
} | ||
} | ||
|
||
export enum PlainGalleryStrategy { | ||
// don't use 0 here | ||
// the first index is 1 and all of the following members are auto-incremented from that point on | ||
ROW = 1, | ||
COLUMN, | ||
GRID, | ||
ADVANCED_GRID | ||
} | ||
|
||
export interface Size { | ||
width: number; | ||
height: number; | ||
unit: string; | ||
} | ||
|
||
|
||
export interface BreakConfig { | ||
length: number; | ||
iconClass: string; | ||
otherCount: number; | ||
} |