-
Notifications
You must be signed in to change notification settings - Fork 0
/
macy.d.ts
34 lines (34 loc) · 955 Bytes
/
macy.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
declare module "macy" {
export default class Macy {
constructor(options: Options);
on(event: string, callback: () => void): void;
off(event: string, callback: () => void): void;
remove(): void;
reInit(): void;
runOnImageLoad(func: () => void, everyLoad?: boolean): void;
recalculate(refresh?: boolean, loaded?: boolean): void;
recalculateOnImageLoad(waitUntilImageFinish?: boolean): void;
}
export interface Options {
container: string;
trueOrder?: boolean;
waitForImages?: boolean;
useOwnImageLoader?: boolean;
debug?: boolean;
mobileFirst?: boolean;
columns?: number;
margin?: Margin;
breakAt?: Breakpoints;
cancelLegacy?: boolean;
useContainerForBreakpoints?: boolean;
}
export interface Breakpoints {
[key: number]: { margin?: Margin; columns?: number } | number;
}
export type Margin =
| {
x: number;
y: number;
}
| number;
}