|
1 | 1 | import { LogTracer, Tracer } from './'; |
2 | 2 |
|
3 | 3 | class GraphTracer extends Tracer { |
4 | | - set(array2d?: any[][]): this { |
5 | | - return this.command('set', arguments); |
| 4 | + set(array2d?: any[][]) { |
| 5 | + this.command('set', arguments); |
6 | 6 | } |
7 | 7 |
|
8 | | - directed(isDirected?: boolean): this { |
9 | | - return this.command('directed', arguments); |
| 8 | + directed(isDirected?: boolean) { |
| 9 | + this.command('directed', arguments); |
| 10 | + return this; |
10 | 11 | } |
11 | 12 |
|
12 | | - weighted(isWeighted?: boolean): this { |
13 | | - return this.command('weighted', arguments); |
| 13 | + weighted(isWeighted?: boolean) { |
| 14 | + this.command('weighted', arguments); |
| 15 | + return this; |
14 | 16 | } |
15 | 17 |
|
16 | | - addNode(id: any, weight?: any, x?: number, y?: number, visitedCount?: number, selectedCount?: number): this { |
17 | | - return this.command('addNode', arguments); |
| 18 | + layoutCircle() { |
| 19 | + this.command('layoutCircle', arguments); |
| 20 | + return this; |
18 | 21 | } |
19 | 22 |
|
20 | | - updateNode(id: any, weight?: any, x?: number, y?: number, visitedCount?: number, selectedCount?: number): this { |
21 | | - return this.command('updateNode', arguments); |
| 23 | + layoutTree(root?: any, sorted?: boolean) { |
| 24 | + this.command('layoutTree', arguments); |
| 25 | + return this; |
22 | 26 | } |
23 | 27 |
|
24 | | - removeNode(id: any): this { |
25 | | - return this.command('removeNode', arguments); |
| 28 | + layoutRandom() { |
| 29 | + this.command('layoutRandom', arguments); |
| 30 | + return this; |
26 | 31 | } |
27 | 32 |
|
28 | | - addEdge(source: any, target: any, weight?: any, visitedCount?: number, selectedCount?: number): this { |
29 | | - return this.command('addEdge', arguments); |
| 33 | + addNode(id: any, weight?: any, x?: number, y?: number, visitedCount?: number, selectedCount?: number) { |
| 34 | + this.command('addNode', arguments); |
30 | 35 | } |
31 | 36 |
|
32 | | - updateEdge(source: any, target: any, weight?: any, visitedCount?: number, selectedCount?: number): this { |
33 | | - return this.command('updateEdge', arguments); |
| 37 | + updateNode(id: any, weight?: any, x?: number, y?: number, visitedCount?: number, selectedCount?: number) { |
| 38 | + this.command('updateNode', arguments); |
34 | 39 | } |
35 | 40 |
|
36 | | - removeEdge(source: any, target: any): this { |
37 | | - return this.command('removeEdge', arguments); |
| 41 | + removeNode(id: any) { |
| 42 | + this.command('removeNode', arguments); |
38 | 43 | } |
39 | 44 |
|
40 | | - layoutCircle() { |
41 | | - return this.command('layoutCircle', arguments); |
| 45 | + addEdge(source: any, target: any, weight?: any, visitedCount?: number, selectedCount?: number) { |
| 46 | + this.command('addEdge', arguments); |
42 | 47 | } |
43 | 48 |
|
44 | | - layoutTree(root?: any, sorted?: boolean) { |
45 | | - return this.command('layoutTree', arguments); |
| 49 | + updateEdge(source: any, target: any, weight?: any, visitedCount?: number, selectedCount?: number) { |
| 50 | + this.command('updateEdge', arguments); |
46 | 51 | } |
47 | 52 |
|
48 | | - layoutRandom() { |
49 | | - return this.command('layoutRandom', arguments); |
| 53 | + removeEdge(source: any, target: any) { |
| 54 | + this.command('removeEdge', arguments); |
50 | 55 | } |
51 | 56 |
|
52 | 57 | visit(target: any, source?: any, weight?: any) { |
53 | | - return this.command('visit', arguments); |
| 58 | + this.command('visit', arguments); |
54 | 59 | } |
55 | 60 |
|
56 | 61 | leave(target: any, source?: any, weight?: any) { |
57 | | - return this.command('leave', arguments); |
| 62 | + this.command('leave', arguments); |
58 | 63 | } |
59 | 64 |
|
60 | 65 | select(target: any, source?: any) { |
61 | | - return this.command('select', arguments); |
| 66 | + this.command('select', arguments); |
62 | 67 | } |
63 | 68 |
|
64 | 69 | deselect(target: any, source?: any) { |
65 | | - return this.command('deselect', arguments); |
| 70 | + this.command('deselect', arguments); |
66 | 71 | } |
67 | 72 |
|
68 | 73 | log(logTracer: LogTracer) { |
69 | | - return this.command('log', arguments); |
| 74 | + this.command('log', arguments); |
70 | 75 | } |
71 | 76 | } |
72 | 77 |
|
|
0 commit comments