-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.d.ts
74 lines (74 loc) · 1.98 KB
/
index.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
/// <reference types="node" />
import { EventEmitter } from "events";
import * as d3 from "d3";
export interface Job {
refreshLayout: boolean;
size: number[];
words: any;
}
export interface Word {
value: any;
text: string;
link?: string;
target?: string;
}
export interface Options {
orientation?: string;
minFontSize?: number;
maxFontSize?: number;
scale?: string;
seedColors?: string[];
showEase?: (normalizedTime: number) => number;
showDuration?: number;
}
export declare enum STATUS {
COMPLETE = 0,
INCOMPLETE = 1,
}
export declare class TagCloud extends EventEmitter {
_element: HTMLElement;
_d3SvgContainer: d3.Selection<d3.BaseType, any, any, undefined>;
_svgGroup: d3.Selection<d3.BaseType, any, any, undefined>;
_size: number[];
_fontFamily: string;
_fontStyle: string;
_fontWeight: string;
_spiral: string;
_timeInterval: number;
_padding: number;
_orientation: string;
_minFontSize: number;
_maxFontSize: number;
_textScale: string;
_optionsAsString: string;
_seedColor: string[];
_showEase: (normalizedTime: number) => number;
_showDuration: number;
_words: any;
_setTimeoutId: any;
_completedJob?: Job;
_pendingJob?: Job;
_layoutIsUpdating: boolean;
_allInViewBox: boolean;
_DOMisUpdating: boolean;
_colorScale: Function;
_cloudWidth: number;
_cloudHeight: number;
constructor(domNode: HTMLElement);
setOptions(options: Options): void;
resize(): void;
setData(data: any[]): void;
destroy(): void;
getStatus(): STATUS;
_updateContainerSize(): void;
_isJobRunning(): any;
_processPendingJob(): Promise<void>;
_pickPendingJob(): Promise<Job>;
_emptyDOM(): void;
_updateDOM(job: Job): Promise<{} | undefined>;
_makeTextSizeMapper(): any;
_makeNewJob(): Job;
_makeJobPreservingLayout(): Job;
_invalidate(keepLayout: boolean): void;
_updateLayout(job: Job): Promise<{}>;
}