@antv/layout 1.2.3 → 1.2.5

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.
package/lib/circular.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { Graph, CircularLayoutOptions, Layout, LayoutMapping } from "./types";
1
+ import type { Graph, CircularLayoutOptions, Layout, LayoutMapping } from './types';
2
2
  /**
3
3
  * Layout arranging the nodes in a circle.
4
4
  *
package/lib/circular.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { __assign, __awaiter, __generator, __read } from "tslib";
2
- import { formatSizeFn, formatNumberFn, cloneFormatData } from "./util";
3
- import { handleSingleNodeGraph } from "./util/common";
2
+ import { formatSizeFn, formatNumberFn, cloneFormatData } from './util';
3
+ import { handleSingleNodeGraph } from './util/common';
4
4
  var DEFAULTS_LAYOUT_OPTIONS = {
5
5
  radius: null,
6
6
  startRadius: null,
@@ -31,7 +31,7 @@ var CircularLayout = /** @class */ (function () {
31
31
  function CircularLayout(options) {
32
32
  if (options === void 0) { options = {}; }
33
33
  this.options = options;
34
- this.id = "circular";
34
+ this.id = 'circular';
35
35
  this.options = __assign(__assign({}, DEFAULTS_LAYOUT_OPTIONS), options);
36
36
  }
37
37
  /**
@@ -103,15 +103,15 @@ var CircularLayout = /** @class */ (function () {
103
103
  }
104
104
  astep = angleStep * angleRatio;
105
105
  layoutNodes = [];
106
- if (ordering === "topology") {
106
+ if (ordering === 'topology') {
107
107
  // layout according to the topology
108
108
  layoutNodes = topologyOrdering(graph, nodes);
109
109
  }
110
- else if (ordering === "topology-directed") {
110
+ else if (ordering === 'topology-directed') {
111
111
  // layout according to the topology
112
112
  layoutNodes = topologyOrdering(graph, nodes, true);
113
113
  }
114
- else if (ordering === "degree") {
114
+ else if (ordering === 'degree') {
115
115
  // layout according to the descent order of degrees
116
116
  layoutNodes = degreeOrdering(graph, nodes);
117
117
  }
@@ -177,8 +177,8 @@ var topologyOrdering = function (graph, nodes, directed) {
177
177
  nodes.forEach(function (node, i) {
178
178
  if (i !== 0) {
179
179
  if ((i === n - 1 ||
180
- graph.getDegree(node.id, "both") !==
181
- graph.getDegree(nodes[i + 1].id, "both") ||
180
+ graph.getDegree(node.id, 'both') !==
181
+ graph.getDegree(nodes[i + 1].id, 'both') ||
182
182
  graph.areNeighbors(orderedCNodes[k].id, node.id)) &&
183
183
  !pickFlags[node.id]) {
184
184
  orderedCNodes.push(cloneFormatData(node));
@@ -229,7 +229,7 @@ function degreeOrdering(graph, nodes) {
229
229
  orderedNodes.push(cloneFormatData(node));
230
230
  });
231
231
  orderedNodes.sort(function (nodeA, nodeB) {
232
- return graph.getDegree(nodeA.id, "both") - graph.getDegree(nodeB.id, "both");
232
+ return graph.getDegree(nodeA.id, 'both') - graph.getDegree(nodeB.id, 'both');
233
233
  });
234
234
  return orderedNodes;
235
235
  }
@@ -244,10 +244,10 @@ var calculateCenter = function (width, height, center) {
244
244
  var calculatedWidth = width;
245
245
  var calculatedHeight = height;
246
246
  var calculatedCenter = center;
247
- if (!calculatedWidth && typeof window !== "undefined") {
247
+ if (!calculatedWidth && typeof window !== 'undefined') {
248
248
  calculatedWidth = window.innerWidth;
249
249
  }
250
- if (!calculatedHeight && typeof window !== "undefined") {
250
+ if (!calculatedHeight && typeof window !== 'undefined') {
251
251
  calculatedHeight = window.innerHeight;
252
252
  }
253
253
  if (!calculatedCenter) {
@@ -0,0 +1,32 @@
1
+ import type { Graph, ComboCombinedLayoutOptions, Layout, LayoutMapping } from './types';
2
+ /**
3
+ * Layout arranging the nodes and combos with combination of inner and outer layouts.
4
+ *
5
+ * @example
6
+ * // Assign layout options when initialization.
7
+ * const layout = new ComboCombinedLayout({});
8
+ * const positions = await layout.execute(graph); // { nodes: [], edges: [] }
9
+ *
10
+ * // Or use different options later.
11
+ * const layout = new ComboCombinedLayout({ radius: 10 });
12
+ * const positions = await layout.execute(graph, { radius: 20 }); // { nodes: [], edges: [] }
13
+ *
14
+ * // If you want to assign the positions directly to the nodes, use assign method.
15
+ * await layout.assign(graph, { radius: 20 });
16
+ */
17
+ export declare class ComboCombinedLayout implements Layout<ComboCombinedLayoutOptions> {
18
+ options: ComboCombinedLayoutOptions;
19
+ id: string;
20
+ constructor(options?: ComboCombinedLayoutOptions);
21
+ /**
22
+ * Return the positions of nodes and edges(if needed).
23
+ */
24
+ execute(graph: Graph, options?: ComboCombinedLayoutOptions): Promise<LayoutMapping>;
25
+ /**
26
+ * To directly assign the positions to the nodes.
27
+ */
28
+ assign(graph: Graph, options?: ComboCombinedLayoutOptions): Promise<void>;
29
+ private genericComboCombinedLayout;
30
+ private initVals;
31
+ private getInnerGraphs;
32
+ }
@@ -0,0 +1,441 @@
1
+ import { __assign, __awaiter, __generator, __read, __spreadArray } from "tslib";
2
+ import { isFunction, isNumber, isObject } from '@antv/util';
3
+ import { Graph as GraphCore } from '@antv/graphlib';
4
+ import { isArray, getLayoutBBox, graphTreeDfs } from './util';
5
+ import { handleSingleNodeGraph } from './util/common';
6
+ import { MDSLayout } from './mds';
7
+ import { ForceLayout } from './force';
8
+ import { ConcentricLayout } from './concentric';
9
+ var FORCE_LAYOUT_TYPE_MAP = {
10
+ gForce: true,
11
+ force2: true,
12
+ d3force: true,
13
+ fruchterman: true,
14
+ forceAtlas2: true,
15
+ force: true,
16
+ 'graphin-force': true,
17
+ };
18
+ var DEFAULTS_LAYOUT_OPTIONS = {
19
+ center: [0, 0],
20
+ comboPadding: 10,
21
+ treeKey: 'combo',
22
+ };
23
+ /**
24
+ * Layout arranging the nodes and combos with combination of inner and outer layouts.
25
+ *
26
+ * @example
27
+ * // Assign layout options when initialization.
28
+ * const layout = new ComboCombinedLayout({});
29
+ * const positions = await layout.execute(graph); // { nodes: [], edges: [] }
30
+ *
31
+ * // Or use different options later.
32
+ * const layout = new ComboCombinedLayout({ radius: 10 });
33
+ * const positions = await layout.execute(graph, { radius: 20 }); // { nodes: [], edges: [] }
34
+ *
35
+ * // If you want to assign the positions directly to the nodes, use assign method.
36
+ * await layout.assign(graph, { radius: 20 });
37
+ */
38
+ var ComboCombinedLayout = /** @class */ (function () {
39
+ function ComboCombinedLayout(options) {
40
+ if (options === void 0) { options = {}; }
41
+ this.options = options;
42
+ this.id = 'comboCombined';
43
+ this.options = __assign(__assign({}, DEFAULTS_LAYOUT_OPTIONS), options);
44
+ }
45
+ /**
46
+ * Return the positions of nodes and edges(if needed).
47
+ */
48
+ ComboCombinedLayout.prototype.execute = function (graph, options) {
49
+ return __awaiter(this, void 0, void 0, function () {
50
+ return __generator(this, function (_a) {
51
+ return [2 /*return*/, this.genericComboCombinedLayout(false, graph, options)];
52
+ });
53
+ });
54
+ };
55
+ /**
56
+ * To directly assign the positions to the nodes.
57
+ */
58
+ ComboCombinedLayout.prototype.assign = function (graph, options) {
59
+ return __awaiter(this, void 0, void 0, function () {
60
+ return __generator(this, function (_a) {
61
+ switch (_a.label) {
62
+ case 0: return [4 /*yield*/, this.genericComboCombinedLayout(true, graph, options)];
63
+ case 1:
64
+ _a.sent();
65
+ return [2 /*return*/];
66
+ }
67
+ });
68
+ });
69
+ };
70
+ ComboCombinedLayout.prototype.genericComboCombinedLayout = function (assign, graph, options) {
71
+ return __awaiter(this, void 0, void 0, function () {
72
+ var mergedOptions, center, treeKey, propsOuterLayout, nodes, combos, edges, n, layoutNodes, nodeMap, comboMap, comboNodes, innerGraphLayoutPromises, outerNodeIds, outerLayoutNodes, nodeAncestorIdMap, allHaveNoPosition, outerLayoutEdges, outerPositions, outerLayoutGraph, outerLayout, outerLayoutPreset, result;
73
+ return __generator(this, function (_a) {
74
+ switch (_a.label) {
75
+ case 0:
76
+ mergedOptions = this.initVals(__assign(__assign({}, this.options), options));
77
+ center = mergedOptions.center, treeKey = mergedOptions.treeKey, propsOuterLayout = mergedOptions.outerLayout;
78
+ nodes = graph
79
+ .getAllNodes()
80
+ .filter(function (node) { return !node.data._isCombo; });
81
+ combos = graph
82
+ .getAllNodes()
83
+ .filter(function (node) { return node.data._isCombo; });
84
+ edges = graph.getAllEdges();
85
+ n = nodes === null || nodes === void 0 ? void 0 : nodes.length;
86
+ if (!n || n === 1) {
87
+ return [2 /*return*/, handleSingleNodeGraph(graph, assign, center)];
88
+ }
89
+ layoutNodes = [];
90
+ nodeMap = new Map();
91
+ nodes.forEach(function (node) {
92
+ nodeMap.set(node.id, node);
93
+ });
94
+ comboMap = new Map();
95
+ combos.forEach(function (combo) {
96
+ comboMap.set(combo.id, combo);
97
+ });
98
+ comboNodes = new Map();
99
+ innerGraphLayoutPromises = this.getInnerGraphs(graph, treeKey, nodeMap, comboMap, edges, mergedOptions, comboNodes);
100
+ return [4 /*yield*/, Promise.all(innerGraphLayoutPromises)];
101
+ case 1:
102
+ _a.sent();
103
+ outerNodeIds = new Map();
104
+ outerLayoutNodes = [];
105
+ nodeAncestorIdMap = new Map();
106
+ allHaveNoPosition = true;
107
+ graph.getRoots(treeKey).forEach(function (root) {
108
+ var combo = comboNodes.get(root.id);
109
+ var cacheCombo = comboMap.get(root.id) || nodeMap.get(root.id);
110
+ var comboLayoutNode = {
111
+ id: root.id,
112
+ data: __assign(__assign({}, root.data), { x: combo.data.x || cacheCombo.data.x, y: combo.data.y || cacheCombo.data.y, fx: combo.data.fx || cacheCombo.data.fx, fy: combo.data.fy || cacheCombo.data.fy, mass: combo.data.mass || cacheCombo.data.mass, size: combo.data.size }),
113
+ };
114
+ outerLayoutNodes.push(comboLayoutNode);
115
+ outerNodeIds.set(root.id, true);
116
+ if (!isNaN(comboLayoutNode.data.x) &&
117
+ comboLayoutNode.data.x !== 0 &&
118
+ !isNaN(comboLayoutNode.data.y) &&
119
+ comboLayoutNode.data.y !== 0) {
120
+ allHaveNoPosition = false;
121
+ }
122
+ else {
123
+ comboLayoutNode.data.x = Math.random() * 100;
124
+ comboLayoutNode.data.y = Math.random() * 100;
125
+ }
126
+ graphTreeDfs(graph, [root], function (child) {
127
+ if (child.id !== root.id)
128
+ nodeAncestorIdMap.set(child.id, root.id);
129
+ }, 'TB', treeKey);
130
+ });
131
+ outerLayoutEdges = [];
132
+ edges.forEach(function (edge) {
133
+ var sourceAncestorId = nodeAncestorIdMap.get(edge.source) || edge.source;
134
+ var targetAncestorId = nodeAncestorIdMap.get(edge.target) || edge.target;
135
+ // create an edge for outer layout if both source and target's ancestor combo is in outer layout nodes
136
+ if (sourceAncestorId !== targetAncestorId &&
137
+ outerNodeIds.has(sourceAncestorId) &&
138
+ outerNodeIds.has(targetAncestorId)) {
139
+ outerLayoutEdges.push({
140
+ id: edge.id,
141
+ source: sourceAncestorId,
142
+ target: targetAncestorId,
143
+ data: {},
144
+ });
145
+ }
146
+ });
147
+ if (!(outerLayoutNodes === null || outerLayoutNodes === void 0 ? void 0 : outerLayoutNodes.length)) return [3 /*break*/, 7];
148
+ if (!(outerLayoutNodes.length === 1)) return [3 /*break*/, 2];
149
+ outerLayoutNodes[0].data.x = center[0];
150
+ outerLayoutNodes[0].data.y = center[1];
151
+ return [3 /*break*/, 6];
152
+ case 2:
153
+ outerLayoutGraph = new GraphCore({
154
+ nodes: outerLayoutNodes,
155
+ edges: outerLayoutEdges,
156
+ });
157
+ outerLayout = propsOuterLayout || new ForceLayout();
158
+ if (!(allHaveNoPosition && FORCE_LAYOUT_TYPE_MAP[outerLayout.id])) return [3 /*break*/, 4];
159
+ outerLayoutPreset = outerLayoutNodes.length < 100
160
+ ? new MDSLayout()
161
+ : new ConcentricLayout();
162
+ return [4 /*yield*/, outerLayoutPreset.assign(outerLayoutGraph)];
163
+ case 3:
164
+ _a.sent();
165
+ _a.label = 4;
166
+ case 4: return [4 /*yield*/, outerLayout.execute(outerLayoutGraph, __assign({ center: center, kg: 5, preventOverlap: true, animate: false }, (outerLayout.id === 'force'
167
+ ? {
168
+ gravity: 1,
169
+ factor: 4,
170
+ linkDistance: function (edge, source, target) {
171
+ var sourceSize = Math.max.apply(Math, __spreadArray([], __read(source.data.size))) || 32;
172
+ var targetSize = Math.max.apply(Math, __spreadArray([], __read(target.data.size))) || 32;
173
+ return sourceSize / 2 + targetSize / 2 + 200;
174
+ },
175
+ }
176
+ : {})))];
177
+ case 5:
178
+ outerPositions = _a.sent();
179
+ _a.label = 6;
180
+ case 6:
181
+ // move the combos and their child nodes
182
+ comboNodes.forEach(function (comboNode) {
183
+ var _a;
184
+ var outerPosition = outerPositions.nodes.find(function (pos) { return pos.id === comboNode.id; });
185
+ if (outerPosition) {
186
+ // if it is one of the outer layout nodes, update the positions
187
+ var _b = outerPosition.data, x_1 = _b.x, y_1 = _b.y;
188
+ comboNode.data.visited = true;
189
+ comboNode.data.x = x_1;
190
+ comboNode.data.y = y_1;
191
+ layoutNodes.push({
192
+ id: comboNode.id,
193
+ data: { x: x_1, y: y_1 },
194
+ });
195
+ }
196
+ // move the child nodes
197
+ var _c = comboNode.data, x = _c.x, y = _c.y;
198
+ (_a = comboNode.data.nodes) === null || _a === void 0 ? void 0 : _a.forEach(function (node) {
199
+ layoutNodes.push({
200
+ id: node.id,
201
+ data: { x: node.data.x + x, y: node.data.y + y },
202
+ });
203
+ });
204
+ });
205
+ // move the nodes from top to bottom
206
+ comboNodes.forEach(function (_a) {
207
+ var _b;
208
+ var data = _a.data;
209
+ var x = data.x, y = data.y, visited = data.visited, nodes = data.nodes;
210
+ (_b = nodes) === null || _b === void 0 ? void 0 : _b.forEach(function (node) {
211
+ if (!visited) {
212
+ var layoutNode = layoutNodes.find(function (n) { return n.id === node.id; });
213
+ layoutNode.data.x += x || 0;
214
+ layoutNode.data.y += y || 0;
215
+ }
216
+ });
217
+ });
218
+ _a.label = 7;
219
+ case 7:
220
+ if (assign) {
221
+ layoutNodes.forEach(function (node) {
222
+ graph.mergeNodeData(node.id, {
223
+ x: node.data.x,
224
+ y: node.data.y,
225
+ });
226
+ });
227
+ }
228
+ result = {
229
+ nodes: layoutNodes,
230
+ edges: edges,
231
+ };
232
+ return [2 /*return*/, result];
233
+ }
234
+ });
235
+ });
236
+ };
237
+ ComboCombinedLayout.prototype.initVals = function (options) {
238
+ var formattedOptions = __assign({}, options);
239
+ var nodeSize = options.nodeSize, spacing = options.spacing, comboPadding = options.comboPadding;
240
+ var nodeSizeFunc;
241
+ var spacingFunc;
242
+ // nodeSpacing to function
243
+ if (isNumber(spacing)) {
244
+ spacingFunc = function () { return spacing; };
245
+ }
246
+ else if (isFunction(spacing)) {
247
+ spacingFunc = spacing;
248
+ }
249
+ else {
250
+ spacingFunc = function () { return 0; };
251
+ }
252
+ formattedOptions.spacing = spacingFunc;
253
+ // nodeSize to function
254
+ if (!nodeSize) {
255
+ nodeSizeFunc = function (d) {
256
+ var spacing = spacingFunc(d);
257
+ if (d.size) {
258
+ if (isArray(d.size)) {
259
+ var res = d.size[0] > d.size[1] ? d.size[0] : d.size[1];
260
+ return (res + spacing) / 2;
261
+ }
262
+ if (isObject(d.size)) {
263
+ var res = d.size.width > d.size.height ? d.size.width : d.size.height;
264
+ return (res + spacing) / 2;
265
+ }
266
+ return (d.size + spacing) / 2;
267
+ }
268
+ return 32 + spacing / 2;
269
+ };
270
+ }
271
+ else if (isFunction(nodeSize)) {
272
+ nodeSizeFunc = function (d) {
273
+ var size = nodeSize(d);
274
+ var spacing = spacingFunc(d);
275
+ if (isArray(d.size)) {
276
+ var res = d.size[0] > d.size[1] ? d.size[0] : d.size[1];
277
+ return (res + spacing) / 2;
278
+ }
279
+ return ((size || 32) + spacing) / 2;
280
+ };
281
+ }
282
+ else if (isArray(nodeSize)) {
283
+ var larger = nodeSize[0] > nodeSize[1] ? nodeSize[0] : nodeSize[1];
284
+ var radius_1 = larger / 2;
285
+ nodeSizeFunc = function (d) { return radius_1 + spacingFunc(d) / 2; };
286
+ }
287
+ else {
288
+ // number type
289
+ var radius_2 = nodeSize / 2;
290
+ nodeSizeFunc = function (d) { return radius_2 + spacingFunc(d) / 2; };
291
+ }
292
+ formattedOptions.nodeSize = nodeSizeFunc;
293
+ // comboPadding to function
294
+ var comboPaddingFunc;
295
+ if (isNumber(comboPadding)) {
296
+ comboPaddingFunc = function () { return comboPadding; };
297
+ }
298
+ else if (isArray(comboPadding)) {
299
+ comboPaddingFunc = function () { return Math.max.apply(null, comboPadding); };
300
+ }
301
+ else if (isFunction(comboPadding)) {
302
+ comboPaddingFunc = comboPadding;
303
+ }
304
+ else {
305
+ // null type
306
+ comboPaddingFunc = function () { return 0; };
307
+ }
308
+ formattedOptions.comboPadding = comboPaddingFunc;
309
+ return formattedOptions;
310
+ };
311
+ ComboCombinedLayout.prototype.getInnerGraphs = function (graph, treeKey, nodeMap, comboMap, edges, options, comboNodes) {
312
+ var _this = this;
313
+ var nodeSize = options.nodeSize, comboPadding = options.comboPadding, spacing = options.spacing, innerLayout = options.innerLayout;
314
+ var innerGraphLayout = innerLayout || new ConcentricLayout({});
315
+ var innerLayoutOptions = {
316
+ center: [0, 0],
317
+ preventOverlap: true,
318
+ nodeSpacing: spacing,
319
+ };
320
+ var innerLayoutPromises = [];
321
+ var getSize = function (node) {
322
+ // @ts-ignore
323
+ var padding = (comboPadding === null || comboPadding === void 0 ? void 0 : comboPadding(node)) || 10;
324
+ if (isArray(padding))
325
+ padding = Math.max.apply(Math, __spreadArray([], __read(padding)));
326
+ return {
327
+ size: padding ? [padding * 2, padding * 2] : [30, 30],
328
+ padding: padding,
329
+ };
330
+ };
331
+ graph.getRoots(treeKey).forEach(function (root) {
332
+ // @ts-ignore
333
+ comboNodes.set(root.id, {
334
+ id: root.id,
335
+ data: {
336
+ nodes: [],
337
+ size: getSize(root).size,
338
+ },
339
+ });
340
+ var start = Promise.resolve();
341
+ // Regard the child nodes in one combo as a graph, and layout them from bottom to top
342
+ graphTreeDfs(graph, [root], function (treeNode) {
343
+ var _a;
344
+ if (!treeNode.data._isCombo)
345
+ return;
346
+ var _b = getSize(treeNode), nsize = _b.size, padding = _b.padding;
347
+ if (!((_a = graph.getChildren(treeNode.id, treeKey)) === null || _a === void 0 ? void 0 : _a.length)) {
348
+ // empty combo
349
+ comboNodes.set(treeNode.id, {
350
+ id: treeNode.id,
351
+ data: __assign(__assign({}, treeNode.data), { size: nsize }),
352
+ });
353
+ }
354
+ else {
355
+ // combo not empty
356
+ var comboNode = comboNodes.get(treeNode.id);
357
+ comboNodes.set(treeNode.id, {
358
+ id: treeNode.id,
359
+ data: __assign({ nodes: [] }, comboNode === null || comboNode === void 0 ? void 0 : comboNode.data),
360
+ });
361
+ var innerLayoutNodeIds_1 = new Map();
362
+ var innerLayoutNodes_1 = graph
363
+ .getChildren(treeNode.id, treeKey)
364
+ .map(function (child) {
365
+ if (child.data._isCombo) {
366
+ if (!comboNodes.has(child.id))
367
+ comboNodes.set(child.id, {
368
+ id: child.id,
369
+ data: __assign({}, child.data),
370
+ });
371
+ innerLayoutNodeIds_1.set(child.id, true);
372
+ return comboNodes.get(child.id);
373
+ }
374
+ var oriNode = nodeMap.get(child.id) || comboMap.get(child.id);
375
+ innerLayoutNodeIds_1.set(child.id, true);
376
+ return {
377
+ id: child.id,
378
+ data: __assign(__assign({}, oriNode.data), child.data),
379
+ };
380
+ });
381
+ var innerGraphData_1 = {
382
+ nodes: innerLayoutNodes_1,
383
+ edges: edges.filter(function (edge) {
384
+ return innerLayoutNodeIds_1.has(edge.source) &&
385
+ innerLayoutNodeIds_1.has(edge.target);
386
+ }),
387
+ };
388
+ var minNodeSize_1 = Infinity;
389
+ innerLayoutNodes_1.forEach(function (node) {
390
+ var _a, _b;
391
+ var size = node.data.size;
392
+ if (!size) {
393
+ size = ((_a = comboNodes.get(node.id)) === null || _a === void 0 ? void 0 : _a.data.size) ||
394
+ ((_b = nodeSize) === null || _b === void 0 ? void 0 : _b(node)) || [30, 30];
395
+ }
396
+ if (isNumber(size))
397
+ size = [size, size];
398
+ var _c = __read(size, 2), size0 = _c[0], size1 = _c[1];
399
+ if (minNodeSize_1 > size0)
400
+ minNodeSize_1 = size0;
401
+ if (minNodeSize_1 > size1)
402
+ minNodeSize_1 = size1;
403
+ node.data.size = size;
404
+ });
405
+ // innerGraphLayout.assign(innerGraphCore, innerLayoutOptions);
406
+ start = start.then(function () { return __awaiter(_this, void 0, void 0, function () {
407
+ var innerGraphCore, innerLayout, _a, minX, minY, maxX, maxY, center, size;
408
+ return __generator(this, function (_b) {
409
+ switch (_b.label) {
410
+ case 0:
411
+ innerGraphCore = new GraphCore(innerGraphData_1);
412
+ return [4 /*yield*/, innerGraphLayout.assign(innerGraphCore, innerLayoutOptions)];
413
+ case 1:
414
+ innerLayout = _b.sent();
415
+ _a = getLayoutBBox(innerLayoutNodes_1), minX = _a.minX, minY = _a.minY, maxX = _a.maxX, maxY = _a.maxY;
416
+ center = { x: (maxX + minX) / 2, y: (maxY + minY) / 2 };
417
+ innerGraphData_1.nodes.forEach(function (node) {
418
+ node.data.x -= center.x;
419
+ node.data.y -= center.y;
420
+ });
421
+ size = [
422
+ Math.max(maxX - minX, minNodeSize_1) + padding * 2,
423
+ Math.max(maxY - minY, minNodeSize_1) + padding * 2,
424
+ ];
425
+ comboNodes.get(treeNode.id).data.size = size;
426
+ comboNodes.get(treeNode.id).data.nodes = innerLayoutNodes_1;
427
+ return [2 /*return*/, innerLayout];
428
+ }
429
+ });
430
+ }); });
431
+ }
432
+ return true;
433
+ }, 'BT', treeKey);
434
+ innerLayoutPromises.push(start);
435
+ });
436
+ return innerLayoutPromises;
437
+ };
438
+ return ComboCombinedLayout;
439
+ }());
440
+ export { ComboCombinedLayout };
441
+ //# sourceMappingURL=comboCombined.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"comboCombined.js","sourceRoot":"","sources":["../src/comboCombined.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAC5D,OAAO,EAAE,KAAK,IAAI,SAAS,EAAM,MAAM,gBAAgB,CAAC;AAUxD,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAC9D,OAAO,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;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CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,KAAK,GAAG,kBAAgB,CAAC;oCAC1D,sBAAO,WAAW,EAAC;;;yBACpB,CAAC,CAAC;iBACJ;gBACD,OAAO,IAAI,CAAC;YACd,CAAC,EACD,IAAI,EACJ,OAAO,CACR,CAAC;YACF,mBAAmB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAClC,CAAC,CAAC,CAAC;QACH,OAAO,mBAAmB,CAAC;IAC7B,CAAC;IACH,0BAAC;AAAD,CAAC,AAhdD,IAgdC"}
@@ -1,4 +1,4 @@
1
- import type { Graph, LayoutMapping, ConcentricLayoutOptions, Layout } from "./types";
1
+ import type { Graph, LayoutMapping, ConcentricLayoutOptions, Layout } from './types';
2
2
  /**
3
3
  * Layout arranging the nodes in concentrics
4
4
  *