@hpcc-js/graph 2.87.3 → 2.87.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. package/LICENSE +43 -43
  2. package/README.md +256 -256
  3. package/dist/index.es6.js +3 -3
  4. package/dist/index.es6.js.map +1 -1
  5. package/dist/index.js +3 -3
  6. package/dist/index.js.map +1 -1
  7. package/dist/index.min.js +1 -1
  8. package/dist/index.min.js.map +1 -1
  9. package/package.json +8 -8
  10. package/src/AdjacencyGraph.ts +224 -224
  11. package/src/Edge.css +23 -23
  12. package/src/Edge.ts +257 -257
  13. package/src/Graph.css +18 -18
  14. package/src/Graph.ts +1075 -1075
  15. package/src/GraphData.ts +187 -187
  16. package/src/GraphLayouts.ts +173 -173
  17. package/src/Sankey.css +46 -46
  18. package/src/Sankey.ts +291 -291
  19. package/src/Subgraph.css +10 -10
  20. package/src/Subgraph.ts +165 -165
  21. package/src/Vertex.css +3 -3
  22. package/src/Vertex.ts +282 -282
  23. package/src/__package__.ts +3 -3
  24. package/src/__tests__/data.ts +444 -444
  25. package/src/__tests__/index.ts +1 -1
  26. package/src/__tests__/test1.ts +18 -18
  27. package/src/__tests__/test2.ts +80 -80
  28. package/src/__tests__/test3.ts +46 -46
  29. package/src/__tests__/test4.ts +66 -66
  30. package/src/__tests__/test5.ts +85 -85
  31. package/src/graph2/dataGraph.ts +305 -305
  32. package/src/graph2/graph.css +34 -34
  33. package/src/graph2/graph.ts +135 -135
  34. package/src/graph2/graphReactT.ts +44 -44
  35. package/src/graph2/graphT.ts +1330 -1330
  36. package/src/graph2/index.ts +7 -7
  37. package/src/graph2/layouts/circle.ts +37 -37
  38. package/src/graph2/layouts/dagre.ts +132 -132
  39. package/src/graph2/layouts/dagreWorker.ts +35 -35
  40. package/src/graph2/layouts/forceDirected.ts +117 -117
  41. package/src/graph2/layouts/forceDirectedWorker.ts +30 -30
  42. package/src/graph2/layouts/geoForceDirected.ts +112 -112
  43. package/src/graph2/layouts/graphviz.ts +124 -124
  44. package/src/graph2/layouts/graphvizWorker.ts +71 -71
  45. package/src/graph2/layouts/index.ts +7 -7
  46. package/src/graph2/layouts/layout.ts +105 -105
  47. package/src/graph2/layouts/null.ts +35 -35
  48. package/src/graph2/layouts/placeholders.ts +103 -103
  49. package/src/graph2/layouts/tree.ts +328 -328
  50. package/src/graph2/liteMap.ts +72 -72
  51. package/src/graph2/liteSVGZooom.ts +61 -61
  52. package/src/graph2/sankeyGraph.css +45 -45
  53. package/src/graph2/sankeyGraph.ts +316 -316
  54. package/src/graph2/subgraph.tsx +30 -30
  55. package/src/graph2/vertex.tsx +31 -31
  56. package/src/index.ts +8 -8
  57. package/src/test.ts +649 -649
  58. package/types/__package__.d.ts +2 -2
  59. package/types/__package__.d.ts.map +1 -1
  60. package/types-3.4/__package__.d.ts +2 -2
@@ -1,329 +1,329 @@
1
- import { Graph2 } from "@hpcc-js/util";
2
- import { cluster, hierarchy, tree } from "d3-hierarchy";
3
- import { linkHorizontal as d3LinkHorizontal } from "d3-shape";
4
- import { Hierarchy } from "./dagreWorker";
5
- import { Layout, Point } from "./layout";
6
- import { VertexPlaceholder, EdgePlaceholder, SubgraphPlaceholder } from "./placeholders";
7
-
8
- const linkHorizontal = d3LinkHorizontal<any, { x: number, y: number }>()
9
- .x(d => d.x)
10
- .y(d => d.y)
11
- ;
12
-
13
- class Bounds {
14
-
15
- get x() {
16
- return this.x1;
17
- }
18
-
19
- get y() {
20
- return this.y1;
21
- }
22
-
23
- get width() {
24
- return this.x2 - this.x1;
25
- }
26
-
27
- get height() {
28
- return this.y2 - this.y1;
29
- }
30
-
31
- get center() {
32
- return {
33
- x: this.x1 + this.width / 2,
34
- y: this.y1 + this.height / 2
35
- };
36
- }
37
-
38
- constructor(public x1: number = 0, public y1: number = 0, public x2: number = x1, public y2: number = y1) {
39
- }
40
-
41
- reset(x: number, y: number) {
42
- this.x1 = x;
43
- this.x2 = x;
44
- this.y1 = y;
45
- this.y2 = y;
46
- }
47
-
48
- expand(x: number, y: number) {
49
- if (this.x1 > x) {
50
- this.x1 = x;
51
- } else if (this.x2 < x) {
52
- this.x2 = x;
53
- }
54
- if (this.y1 > y) {
55
- this.y1 = y;
56
- } else if (this.y2 < y) {
57
- this.y2 = y;
58
- }
59
- }
60
- }
61
-
62
- interface Node {
63
- origData: VertexPlaceholder;
64
- children: Node[];
65
- }
66
-
67
- export interface EdgeLayout {
68
- path: string;
69
- labelPos: Point;
70
- }
71
-
72
- export interface Options {
73
-
74
- }
75
-
76
- export interface TidyTreeOptions extends Options {
77
- rankdir: "TB" | "LR";
78
- }
79
-
80
- export class TidyTreeBase extends Layout {
81
-
82
- constructor(graph, protected options: Options) {
83
- super(graph);
84
- }
85
-
86
- private _visited = {};
87
- protected _tree: Node;
88
- protected _d3Hierarchy: Hierarchy;
89
-
90
- protected sortTree(data: Graph2, node?: Node) {
91
- if (!node) {
92
- node = this._tree;
93
- }
94
- // Place busiest children at the top of the list ---
95
- node.children.sort((l, r) => data.neighbors(r.origData.id).length - data.neighbors(l.origData.id).length);
96
-
97
- // Move busiest children to the middle of the list ---
98
- const children: Node[] = [];
99
- node.children.forEach((n, i) => {
100
- if (i % 2 === 0) {
101
- children.push(n);
102
- } else {
103
- children.unshift(n);
104
- }
105
- });
106
- node.children = children;
107
-
108
- // Recurse ---
109
- node.children.forEach(cnode => this.sortTree(data, cnode));
110
- }
111
-
112
- protected depthFirst(data: Graph2<VertexPlaceholder, EdgePlaceholder, SubgraphPlaceholder>, v: VertexPlaceholder, parent?) {
113
- if (parent === undefined) {
114
- this._visited = {};
115
- this._tree = undefined;
116
- }
117
-
118
- if (!this._visited[v.id]) {
119
- this._visited[v.id] = v;
120
- const node: Node = {
121
- origData: v,
122
- children: []
123
- };
124
- if (parent === undefined) {
125
- this._tree = node;
126
- } else {
127
- parent.children.push(node);
128
- }
129
- data.neighbors(v.id).forEach(n => this.depthFirst(data, n, node));
130
- }
131
- }
132
-
133
- protected breadthFirst(data: Graph2<VertexPlaceholder, EdgePlaceholder, SubgraphPlaceholder>, v: VertexPlaceholder) {
134
- this._visited = {};
135
- this._visited[v.id] = v;
136
- this._tree = {
137
- origData: v,
138
- children: []
139
- };
140
-
141
- const q: Node[] = [];
142
- q.push(this._tree);
143
- while (q.length) {
144
- const node = q.shift();
145
- data.neighbors(node.origData.id).forEach(n => {
146
- if (!this._visited[n.id]) {
147
- this._visited[n.id] = n;
148
- const nnode = {
149
- origData: n,
150
- children: []
151
- };
152
- node.children.push(nnode);
153
- q.push(nnode);
154
- }
155
- });
156
- }
157
- this.sortTree(data);
158
- }
159
-
160
- start(): Promise<this> {
161
- return super.start().then(() => {
162
- const data = this._graph.graphData();
163
- const vertices = data.allVertices();
164
-
165
- let centroid; // TODO Could Be Many (default should be all with 0 in edges?)
166
- for (const v of vertices) {
167
- delete v.fx;
168
- delete v.fy;
169
- if (centroid === undefined) {
170
- centroid = v;
171
- }
172
- if (v.props.centroid) {
173
- centroid = v;
174
- break;
175
- }
176
- }
177
-
178
- const edges = data.allEdges();
179
- edges.forEach(e => delete e.points);
180
-
181
- this.breadthFirst(data, centroid);
182
- this._d3Hierarchy = hierarchy(this._tree);
183
- return this;
184
- });
185
- }
186
-
187
- finalize(nodes: Node[]) {
188
- const size = this._graph.size();
189
-
190
- const bounds = new Bounds();
191
- nodes.forEach((d, i) => {
192
- if (i === 0) {
193
- bounds.reset(d.origData.x, d.origData.y);
194
- } else {
195
- bounds.expand(d.origData.x, d.origData.y);
196
- }
197
- });
198
-
199
- const offset = {
200
- x: size.width / 2 - bounds.center.x,
201
- y: size.height / 2 - bounds.center.y
202
- };
203
-
204
- nodes.forEach(d => {
205
- d.origData.x += offset.x;
206
- d.origData.y += offset.y;
207
- });
208
-
209
- this._graph
210
- .moveVertices(true)
211
- .moveEdges(true)
212
- ;
213
- this.stop();
214
- }
215
- }
216
-
217
- export class Tree extends TidyTreeBase {
218
-
219
- constructor(graph, protected options: TidyTreeOptions) {
220
- super(graph, options);
221
- }
222
-
223
- start(): Promise<this> {
224
- return super.start().then(() => {
225
- const treeFunc = tree().nodeSize([this.options.rankdir === "TB" ? 200 : 100, this.options.rankdir === "TB" ? 100 : 200]);
226
- const root = treeFunc(this._d3Hierarchy);
227
- const nodes: Node[] = root.descendants().map((d) => {
228
- d.data.origData.x = this.options.rankdir === "TB" ? d.x : d.y;
229
- d.data.origData.y = this.options.rankdir === "TB" ? d.y : d.x;
230
- return d.data;
231
- });
232
-
233
- this.finalize(nodes);
234
- return this;
235
- });
236
- }
237
-
238
- edgePath(ep: EdgePlaceholder, curveDepth: number): EdgeLayout {
239
- const source = this._graph.projectPlacholder(ep.source);
240
- const target = this._graph.projectPlacholder(ep.target);
241
- return {
242
- path: linkHorizontal({ source, target }),
243
- labelPos: this.center([[source.x, source.y], [target.x, target.y]])
244
- };
245
- }
246
- }
247
-
248
- export class RadialTree extends TidyTreeBase {
249
-
250
- constructor(graph) {
251
- super(graph, {});
252
- }
253
-
254
- start(): Promise<this> {
255
- return super.start().then(() => {
256
- const treeFunc = tree()
257
- .size([2 * Math.PI, 1024 / 2])
258
- .separation((a, b) => (a.parent == b.parent ? 1 : 2) / a.depth)
259
- ;
260
- const root = treeFunc(this._d3Hierarchy);
261
- const nodes: Node[] = root.descendants().map((d) => {
262
- d.data.origData.angle = d.x;
263
- d.data.origData.radius = d.y;
264
- d.data.origData.x = Math.sin(d.x) * d.y;
265
- d.data.origData.y = Math.cos(d.x) * d.y;
266
- return d.data;
267
- });
268
-
269
- this.finalize(nodes);
270
- return this;
271
- });
272
- }
273
- }
274
-
275
- export class Dendrogram extends TidyTreeBase {
276
-
277
- constructor(graph, protected options: TidyTreeOptions) {
278
- super(graph, options);
279
- }
280
-
281
- start(): Promise<this> {
282
- return super.start().then(() => {
283
- const treeFunc = cluster().nodeSize([this.options.rankdir === "TB" ? 200 : 100, this.options.rankdir === "TB" ? 100 : 200]);
284
- const root = treeFunc(this._d3Hierarchy);
285
- const nodes: Node[] = root.descendants().map((d) => {
286
- d.data.origData.x = this.options.rankdir === "TB" ? d.x : d.y;
287
- d.data.origData.y = this.options.rankdir === "TB" ? d.y : d.x;
288
- return d.data;
289
- });
290
-
291
- this.finalize(nodes);
292
- return this;
293
- });
294
- }
295
-
296
- edgePath(ep: EdgePlaceholder, curveDepth: number): EdgeLayout {
297
- const source = this._graph.projectPlacholder(ep.source);
298
- const target = this._graph.projectPlacholder(ep.target);
299
- return {
300
- path: linkHorizontal({ source, target }),
301
- labelPos: this.center([[source.x, source.y], [target.x, target.y]])
302
- };
303
- }
304
- }
305
-
306
- export class RadialDendrogram extends TidyTreeBase {
307
-
308
- constructor(graph) {
309
- super(graph, {});
310
- }
311
-
312
- start(): Promise<this> {
313
- return super.start().then(() => {
314
- const treeFunc = cluster()
315
- .size([2 * Math.PI, 1024 / 2])
316
- .separation((a, b) => (a.parent == b.parent ? 1 : 2) / a.depth)
317
- ;
318
- const root = treeFunc(this._d3Hierarchy);
319
- const nodes: Node[] = root.descendants().map((d) => {
320
- d.data.origData.x = Math.sin(d.x) * d.y;
321
- d.data.origData.y = Math.cos(d.x) * d.y;
322
- return d.data;
323
- });
324
-
325
- this.finalize(nodes);
326
- return this;
327
- });
328
- }
1
+ import { Graph2 } from "@hpcc-js/util";
2
+ import { cluster, hierarchy, tree } from "d3-hierarchy";
3
+ import { linkHorizontal as d3LinkHorizontal } from "d3-shape";
4
+ import { Hierarchy } from "./dagreWorker";
5
+ import { Layout, Point } from "./layout";
6
+ import { VertexPlaceholder, EdgePlaceholder, SubgraphPlaceholder } from "./placeholders";
7
+
8
+ const linkHorizontal = d3LinkHorizontal<any, { x: number, y: number }>()
9
+ .x(d => d.x)
10
+ .y(d => d.y)
11
+ ;
12
+
13
+ class Bounds {
14
+
15
+ get x() {
16
+ return this.x1;
17
+ }
18
+
19
+ get y() {
20
+ return this.y1;
21
+ }
22
+
23
+ get width() {
24
+ return this.x2 - this.x1;
25
+ }
26
+
27
+ get height() {
28
+ return this.y2 - this.y1;
29
+ }
30
+
31
+ get center() {
32
+ return {
33
+ x: this.x1 + this.width / 2,
34
+ y: this.y1 + this.height / 2
35
+ };
36
+ }
37
+
38
+ constructor(public x1: number = 0, public y1: number = 0, public x2: number = x1, public y2: number = y1) {
39
+ }
40
+
41
+ reset(x: number, y: number) {
42
+ this.x1 = x;
43
+ this.x2 = x;
44
+ this.y1 = y;
45
+ this.y2 = y;
46
+ }
47
+
48
+ expand(x: number, y: number) {
49
+ if (this.x1 > x) {
50
+ this.x1 = x;
51
+ } else if (this.x2 < x) {
52
+ this.x2 = x;
53
+ }
54
+ if (this.y1 > y) {
55
+ this.y1 = y;
56
+ } else if (this.y2 < y) {
57
+ this.y2 = y;
58
+ }
59
+ }
60
+ }
61
+
62
+ interface Node {
63
+ origData: VertexPlaceholder;
64
+ children: Node[];
65
+ }
66
+
67
+ export interface EdgeLayout {
68
+ path: string;
69
+ labelPos: Point;
70
+ }
71
+
72
+ export interface Options {
73
+
74
+ }
75
+
76
+ export interface TidyTreeOptions extends Options {
77
+ rankdir: "TB" | "LR";
78
+ }
79
+
80
+ export class TidyTreeBase extends Layout {
81
+
82
+ constructor(graph, protected options: Options) {
83
+ super(graph);
84
+ }
85
+
86
+ private _visited = {};
87
+ protected _tree: Node;
88
+ protected _d3Hierarchy: Hierarchy;
89
+
90
+ protected sortTree(data: Graph2, node?: Node) {
91
+ if (!node) {
92
+ node = this._tree;
93
+ }
94
+ // Place busiest children at the top of the list ---
95
+ node.children.sort((l, r) => data.neighbors(r.origData.id).length - data.neighbors(l.origData.id).length);
96
+
97
+ // Move busiest children to the middle of the list ---
98
+ const children: Node[] = [];
99
+ node.children.forEach((n, i) => {
100
+ if (i % 2 === 0) {
101
+ children.push(n);
102
+ } else {
103
+ children.unshift(n);
104
+ }
105
+ });
106
+ node.children = children;
107
+
108
+ // Recurse ---
109
+ node.children.forEach(cnode => this.sortTree(data, cnode));
110
+ }
111
+
112
+ protected depthFirst(data: Graph2<VertexPlaceholder, EdgePlaceholder, SubgraphPlaceholder>, v: VertexPlaceholder, parent?) {
113
+ if (parent === undefined) {
114
+ this._visited = {};
115
+ this._tree = undefined;
116
+ }
117
+
118
+ if (!this._visited[v.id]) {
119
+ this._visited[v.id] = v;
120
+ const node: Node = {
121
+ origData: v,
122
+ children: []
123
+ };
124
+ if (parent === undefined) {
125
+ this._tree = node;
126
+ } else {
127
+ parent.children.push(node);
128
+ }
129
+ data.neighbors(v.id).forEach(n => this.depthFirst(data, n, node));
130
+ }
131
+ }
132
+
133
+ protected breadthFirst(data: Graph2<VertexPlaceholder, EdgePlaceholder, SubgraphPlaceholder>, v: VertexPlaceholder) {
134
+ this._visited = {};
135
+ this._visited[v.id] = v;
136
+ this._tree = {
137
+ origData: v,
138
+ children: []
139
+ };
140
+
141
+ const q: Node[] = [];
142
+ q.push(this._tree);
143
+ while (q.length) {
144
+ const node = q.shift();
145
+ data.neighbors(node.origData.id).forEach(n => {
146
+ if (!this._visited[n.id]) {
147
+ this._visited[n.id] = n;
148
+ const nnode = {
149
+ origData: n,
150
+ children: []
151
+ };
152
+ node.children.push(nnode);
153
+ q.push(nnode);
154
+ }
155
+ });
156
+ }
157
+ this.sortTree(data);
158
+ }
159
+
160
+ start(): Promise<this> {
161
+ return super.start().then(() => {
162
+ const data = this._graph.graphData();
163
+ const vertices = data.allVertices();
164
+
165
+ let centroid; // TODO Could Be Many (default should be all with 0 in edges?)
166
+ for (const v of vertices) {
167
+ delete v.fx;
168
+ delete v.fy;
169
+ if (centroid === undefined) {
170
+ centroid = v;
171
+ }
172
+ if (v.props.centroid) {
173
+ centroid = v;
174
+ break;
175
+ }
176
+ }
177
+
178
+ const edges = data.allEdges();
179
+ edges.forEach(e => delete e.points);
180
+
181
+ this.breadthFirst(data, centroid);
182
+ this._d3Hierarchy = hierarchy(this._tree);
183
+ return this;
184
+ });
185
+ }
186
+
187
+ finalize(nodes: Node[]) {
188
+ const size = this._graph.size();
189
+
190
+ const bounds = new Bounds();
191
+ nodes.forEach((d, i) => {
192
+ if (i === 0) {
193
+ bounds.reset(d.origData.x, d.origData.y);
194
+ } else {
195
+ bounds.expand(d.origData.x, d.origData.y);
196
+ }
197
+ });
198
+
199
+ const offset = {
200
+ x: size.width / 2 - bounds.center.x,
201
+ y: size.height / 2 - bounds.center.y
202
+ };
203
+
204
+ nodes.forEach(d => {
205
+ d.origData.x += offset.x;
206
+ d.origData.y += offset.y;
207
+ });
208
+
209
+ this._graph
210
+ .moveVertices(true)
211
+ .moveEdges(true)
212
+ ;
213
+ this.stop();
214
+ }
215
+ }
216
+
217
+ export class Tree extends TidyTreeBase {
218
+
219
+ constructor(graph, protected options: TidyTreeOptions) {
220
+ super(graph, options);
221
+ }
222
+
223
+ start(): Promise<this> {
224
+ return super.start().then(() => {
225
+ const treeFunc = tree().nodeSize([this.options.rankdir === "TB" ? 200 : 100, this.options.rankdir === "TB" ? 100 : 200]);
226
+ const root = treeFunc(this._d3Hierarchy);
227
+ const nodes: Node[] = root.descendants().map((d) => {
228
+ d.data.origData.x = this.options.rankdir === "TB" ? d.x : d.y;
229
+ d.data.origData.y = this.options.rankdir === "TB" ? d.y : d.x;
230
+ return d.data;
231
+ });
232
+
233
+ this.finalize(nodes);
234
+ return this;
235
+ });
236
+ }
237
+
238
+ edgePath(ep: EdgePlaceholder, curveDepth: number): EdgeLayout {
239
+ const source = this._graph.projectPlacholder(ep.source);
240
+ const target = this._graph.projectPlacholder(ep.target);
241
+ return {
242
+ path: linkHorizontal({ source, target }),
243
+ labelPos: this.center([[source.x, source.y], [target.x, target.y]])
244
+ };
245
+ }
246
+ }
247
+
248
+ export class RadialTree extends TidyTreeBase {
249
+
250
+ constructor(graph) {
251
+ super(graph, {});
252
+ }
253
+
254
+ start(): Promise<this> {
255
+ return super.start().then(() => {
256
+ const treeFunc = tree()
257
+ .size([2 * Math.PI, 1024 / 2])
258
+ .separation((a, b) => (a.parent == b.parent ? 1 : 2) / a.depth)
259
+ ;
260
+ const root = treeFunc(this._d3Hierarchy);
261
+ const nodes: Node[] = root.descendants().map((d) => {
262
+ d.data.origData.angle = d.x;
263
+ d.data.origData.radius = d.y;
264
+ d.data.origData.x = Math.sin(d.x) * d.y;
265
+ d.data.origData.y = Math.cos(d.x) * d.y;
266
+ return d.data;
267
+ });
268
+
269
+ this.finalize(nodes);
270
+ return this;
271
+ });
272
+ }
273
+ }
274
+
275
+ export class Dendrogram extends TidyTreeBase {
276
+
277
+ constructor(graph, protected options: TidyTreeOptions) {
278
+ super(graph, options);
279
+ }
280
+
281
+ start(): Promise<this> {
282
+ return super.start().then(() => {
283
+ const treeFunc = cluster().nodeSize([this.options.rankdir === "TB" ? 200 : 100, this.options.rankdir === "TB" ? 100 : 200]);
284
+ const root = treeFunc(this._d3Hierarchy);
285
+ const nodes: Node[] = root.descendants().map((d) => {
286
+ d.data.origData.x = this.options.rankdir === "TB" ? d.x : d.y;
287
+ d.data.origData.y = this.options.rankdir === "TB" ? d.y : d.x;
288
+ return d.data;
289
+ });
290
+
291
+ this.finalize(nodes);
292
+ return this;
293
+ });
294
+ }
295
+
296
+ edgePath(ep: EdgePlaceholder, curveDepth: number): EdgeLayout {
297
+ const source = this._graph.projectPlacholder(ep.source);
298
+ const target = this._graph.projectPlacholder(ep.target);
299
+ return {
300
+ path: linkHorizontal({ source, target }),
301
+ labelPos: this.center([[source.x, source.y], [target.x, target.y]])
302
+ };
303
+ }
304
+ }
305
+
306
+ export class RadialDendrogram extends TidyTreeBase {
307
+
308
+ constructor(graph) {
309
+ super(graph, {});
310
+ }
311
+
312
+ start(): Promise<this> {
313
+ return super.start().then(() => {
314
+ const treeFunc = cluster()
315
+ .size([2 * Math.PI, 1024 / 2])
316
+ .separation((a, b) => (a.parent == b.parent ? 1 : 2) / a.depth)
317
+ ;
318
+ const root = treeFunc(this._d3Hierarchy);
319
+ const nodes: Node[] = root.descendants().map((d) => {
320
+ d.data.origData.x = Math.sin(d.x) * d.y;
321
+ d.data.origData.y = Math.cos(d.x) * d.y;
322
+ return d.data;
323
+ });
324
+
325
+ this.finalize(nodes);
326
+ return this;
327
+ });
328
+ }
329
329
  }