Skip to content

Commit 8499a51

Browse files
committed
Rename improper method name
1 parent efbb22e commit 8499a51

File tree

5 files changed

+40
-41
lines changed

5 files changed

+40
-41
lines changed

src/Array1DTracer.ts

+6-6
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,27 @@ import { Array2DTracer, ChartTracer } from './';
22

33
class Array1DTracer extends Array2DTracer {
44
set(array1d?: any[]): this {
5-
return this.wtf('set', arguments);
5+
return this.addTrace('set', arguments);
66
}
77

88
patch(x: number, v?: any): this {
9-
return this.wtf('patch', arguments);
9+
return this.addTrace('patch', arguments);
1010
}
1111

1212
depatch(x: number): this {
13-
return this.wtf('depatch', arguments);
13+
return this.addTrace('depatch', arguments);
1414
}
1515

1616
select(sx: number, ex?: number): this {
17-
return this.wtf('select', arguments);
17+
return this.addTrace('select', arguments);
1818
}
1919

2020
deselect(sx: number, ex?: number): this {
21-
return this.wtf('deselect', arguments);
21+
return this.addTrace('deselect', arguments);
2222
}
2323

2424
chart(chartTracer: ChartTracer): this {
25-
return this.wtf('chart', arguments);
25+
return this.addTrace('chart', arguments);
2626
}
2727
}
2828

src/Array2DTracer.ts

+9-9
Original file line numberDiff line numberDiff line change
@@ -2,39 +2,39 @@ import { Tracer } from './';
22

33
class Array2DTracer extends Tracer {
44
set(array2d?: any[][]): this {
5-
return this.wtf('set', arguments);
5+
return this.addTrace('set', arguments);
66
}
77

88
patch(x: number, y: number, v?: any): this {
9-
return this.wtf('patch', arguments);
9+
return this.addTrace('patch', arguments);
1010
}
1111

1212
depatch(x: number, y: number): this {
13-
return this.wtf('depatch', arguments);
13+
return this.addTrace('depatch', arguments);
1414
}
1515

1616
select(sx: number, sy: number, ex?: number, ey?: number): this {
17-
return this.wtf('select', arguments);
17+
return this.addTrace('select', arguments);
1818
}
1919

2020
selectRow(x: number, sy: number, ey: number): this {
21-
return this.wtf('selectRow', arguments);
21+
return this.addTrace('selectRow', arguments);
2222
}
2323

2424
selectCol(y: number, sx: number, ex: number): this {
25-
return this.wtf('selectCol', arguments);
25+
return this.addTrace('selectCol', arguments);
2626
}
2727

2828
deselect(sx: number, sy: number, ex?: number, ey?: number): this {
29-
return this.wtf('deselect', arguments);
29+
return this.addTrace('deselect', arguments);
3030
}
3131

3232
deselectRow(x: number, sy: number, ey: number): this {
33-
return this.wtf('deselectRow', arguments);
33+
return this.addTrace('deselectRow', arguments);
3434
}
3535

3636
deselectCol(y: number, sx: number, ex: number): this {
37-
return this.wtf('deselectCol', arguments);
37+
return this.addTrace('deselectCol', arguments);
3838
}
3939
}
4040

src/GraphTracer.ts

+17-17
Original file line numberDiff line numberDiff line change
@@ -2,71 +2,71 @@ import { LogTracer, Tracer } from './';
22

33
class GraphTracer extends Tracer {
44
set(array2d?: any[][]): this {
5-
return this.wtf('set', arguments);
5+
return this.addTrace('set', arguments);
66
}
77

88
directed(isDirected?: boolean): this {
9-
return this.wtf('directed', arguments);
9+
return this.addTrace('directed', arguments);
1010
}
1111

1212
weighted(isWeighted?: boolean): this {
13-
return this.wtf('weighted', arguments);
13+
return this.addTrace('weighted', arguments);
1414
}
1515

1616
addNode(id: any, weight?: any, x?: number, y?: number, visitedCount?: number, selectedCount?: number): this {
17-
return this.wtf('addNode', arguments);
17+
return this.addTrace('addNode', arguments);
1818
}
1919

2020
updateNode(id: any, weight?: any, x?: number, y?: number, visitedCount?: number, selectedCount?: number): this {
21-
return this.wtf('updateNode', arguments);
21+
return this.addTrace('updateNode', arguments);
2222
}
2323

2424
removeNode(id: any): this {
25-
return this.wtf('removeNode', arguments);
25+
return this.addTrace('removeNode', arguments);
2626
}
2727

2828
addEdge(source: any, target: any, weight?: any, visitedCount?: number, selectedCount?: number): this {
29-
return this.wtf('addEdge', arguments);
29+
return this.addTrace('addEdge', arguments);
3030
}
3131

3232
updateEdge(source: any, target: any, weight?: any, visitedCount?: number, selectedCount?: number): this {
33-
return this.wtf('updateEdge', arguments);
33+
return this.addTrace('updateEdge', arguments);
3434
}
3535

3636
removeEdge(source: any, target: any): this {
37-
return this.wtf('removeEdge', arguments);
37+
return this.addTrace('removeEdge', arguments);
3838
}
3939

4040
layoutCircle() {
41-
return this.wtf('layoutCircle', arguments);
41+
return this.addTrace('layoutCircle', arguments);
4242
}
4343

4444
layoutTree(root?: any, sorted?: boolean) {
45-
return this.wtf('layoutTree', arguments);
45+
return this.addTrace('layoutTree', arguments);
4646
}
4747

4848
layoutRandom() {
49-
return this.wtf('layoutRandom', arguments);
49+
return this.addTrace('layoutRandom', arguments);
5050
}
5151

5252
visit(target: any, source?: any, weight?: any) {
53-
return this.wtf('visit', arguments);
53+
return this.addTrace('visit', arguments);
5454
}
5555

5656
leave(target: any, source?: any, weight?: any) {
57-
return this.wtf('leave', arguments);
57+
return this.addTrace('leave', arguments);
5858
}
5959

6060
select(target: any, source?: any) {
61-
return this.wtf('select', arguments);
61+
return this.addTrace('select', arguments);
6262
}
6363

6464
deselect(target: any, source?: any) {
65-
return this.wtf('deselect', arguments);
65+
return this.addTrace('deselect', arguments);
6666
}
6767

6868
log(logTracer: LogTracer) {
69-
return this.wtf('log', arguments);
69+
return this.addTrace('log', arguments);
7070
}
7171
}
7272

src/LogTracer.ts

+4-5
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,19 @@ import { Tracer } from './';
22

33
class LogTracer extends Tracer {
44
set(log?: string): this {
5-
return this.wtf('set', arguments);
5+
return this.addTrace('set', arguments);
66
}
77

88
print(message: any): this {
9-
console.log(this);
10-
return this.wtf('print', arguments);
9+
return this.addTrace('print', arguments);
1110
}
1211

1312
println(message: any): this {
14-
return this.wtf('println', arguments);
13+
return this.addTrace('println', arguments);
1514
}
1615

1716
printf(format: string, ...args: any[]): this {
18-
return this.wtf('printf', arguments);
17+
return this.addTrace('printf', arguments);
1918
}
2019
}
2120

src/Tracer.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -36,22 +36,22 @@ class Tracer {
3636
this.key = Tracer.addTracer(className, title);
3737
}
3838

39-
wtf(method: string, iArguments: IArguments): this {
39+
addTrace(method: string, iArguments: IArguments): this {
4040
const args = Array.from(iArguments).map(arg => arg instanceof Tracer ? arg.key : arg);
4141
Tracer.addTrace(this.key, method, args);
4242
return this;
4343
}
4444

4545
set(): this {
46-
return this.wtf('set', arguments);
46+
return this.addTrace('set', arguments);
4747
}
4848

4949
reset(): this {
50-
return this.wtf('reset', arguments);
50+
return this.addTrace('reset', arguments);
5151
}
5252

5353
delay(): this {
54-
return this.wtf('delay', arguments);
54+
return this.addTrace('delay', arguments);
5555
}
5656
}
5757

0 commit comments

Comments
 (0)