forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
angular-bootstrap-lightbox.d.ts
51 lines (43 loc) · 1.41 KB
/
angular-bootstrap-lightbox.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
// Type definitions for angular-bootstrap-lightbox
// Project: https://github.com/compact/angular-bootstrap-lightbox
// Definitions by: Roland Zwaga <https://github.com/rolandzwaga>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
declare module angular.bootstrap.lightbox {
export interface ILightboxImageInfo {
url: string;
width: number;
height: number;
thumbUrl?: string;
caption?: string;
}
export interface IImageDimensionLimits {
minWidth?: number;
minHeight?: number;
maxWidth?: number;
maxHeight?: number;
}
export interface IImageDimensionParameter {
windowWidth:number;
windowHeight:number;
imageWidth:number;
imageHeight:number;
}
export interface IModalDimensionsParameter {
windowWidth:number;
windowHeight:number;
imageDisplayWidth:number;
imageDisplayHeight:number;
}
export interface IModalDimensions {
width:number;
height:number;
}
export interface ILightbox {
openModal(images:ILightboxImageInfo[], index:number):void;
}
export interface ILightBoxProvider {
templateUrl:string;
calculateImageDimensionLimits:(dimensions:IImageDimensionParameter)=>IImageDimensionLimits;
calculateModalDimensions:(dimensions:IModalDimensionsParameter)=>IModalDimensions;
}
}