-
-
Notifications
You must be signed in to change notification settings - Fork 16
/
n.ts
101 lines (85 loc) · 2.37 KB
/
n.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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
import { C, Cp, Ck } from '../transformation/hyperbolic-math'
import { HierarchyNode } from 'd3'
import { Path } from '../path/path';
export interface NodePrecalulations {
layoutWeight: number
cullingWeight: number
visWeight: number
weight: number
weightScale: number
label: string
labellen: number
icon: string
imageHref: string
wiki: string
clickable: boolean
cell: boolean
}
export interface NodeLayout {
wedge: {
α: number,
Ω: number,
L?: number,
},
z?: Ck,
zStrCache?: string,
zp?: Cp,
}
export interface NodeTransformation {
cache?: C,
cachep?: Cp,
strCache?: string,
transformStrCache?: string,
transformStrCacheZ?: string,
scaleStrText?: string,
distScale?: number,
dampedDistScale?: number,
isOutλ,
isOut99,
isOutWeight,
isOut,
hasOutPeriChildren,
hasOutWeightChildren,
hasOutChildren: boolean,
}
export interface NodePath {
headof: Path,
partof: Path[],
finalcolor: string,
labelcolor: string,
isPartOfAnySelectionPath?: boolean,
isPartOfAnyHoverPath?: boolean,
}
export interface N extends NodeTransformation {
mergeId: number,
id: string, // mess
name?: string,
data: any, // d3
parent: N,
children: Array<N>,
depth: number,
height: number,
value?: number,
ancestors,
descendants,
leaves,
each,
sum,
precalc: NodePrecalulations
pathes: NodePath
minWeight: number
/*
unitdisk:
{
layout: NodeLayout,
transformation: NodeTransformation
}
navigationUnitdisk:
{
layout: NodeLayout,
transformation: NodeTransformation
}
*/
layout: NodeLayout
layoutReference: NodeLayout
}