forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathd3.cloud.layout.d.ts
45 lines (38 loc) · 1.24 KB
/
d3.cloud.layout.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
// Type definitions for d3JS cloud layout plugin by Jason Davies
// Project: https://github.com/jasondavies/d3-cloud
// Definitions by: hans windhoff <https://github.com/hansrwindhoff>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../d3/d3.d.ts" />
declare module D3 {
export module Layout {
export interface IRotate {
(number:number) : CloudLayout;
(number:()=>number) : CloudLayout;
}
export interface CloudLayout {
(layers: any[], index?: number): any[];
values(accessor?: (d: any) => any): CloudLayout;
offset(offset: string): CloudLayout;
size: {
/**
* Gets the available layout size
*/
(): Array<number>;
/**
* Sets the available layout size
*/
(size: Array<number>): CloudLayout;
};
words: (inputArray: Array<any>) => CloudLayout;
rotate:IRotate;
padding: (number:number) => CloudLayout;
font: (string:string) => CloudLayout;
fontSize(fctn: (d: any) => number): CloudLayout;
on: (eventname: string, callee: (words: any[]) => void) => CloudLayout;
start: () => CloudLayout;
}
export interface Layout {
cloud(): CloudLayout;
}
}
}