@flowgram.ai/fixed-layout-core 0.1.0-alpha.8 → 0.1.0-alpha.9
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/dist/esm/index.js +46 -69
- package/dist/esm/index.js.map +1 -1
- package/dist/index.js +46 -69
- package/dist/index.js.map +1 -1
- package/package.json +7 -7
package/dist/esm/index.js
CHANGED
|
@@ -86,14 +86,12 @@ var DynamicSplitRegistry = {
|
|
|
86
86
|
return node.document.addInlineBlocks(node, json.blocks || []);
|
|
87
87
|
},
|
|
88
88
|
getInputPoint(transform) {
|
|
89
|
-
|
|
90
|
-
return ((_a = transform.firstChild) == null ? void 0 : _a.inputPoint) || transform.defaultInputPoint;
|
|
89
|
+
return transform.firstChild?.inputPoint || transform.defaultInputPoint;
|
|
91
90
|
},
|
|
92
91
|
getOutputPoint(transform, layout) {
|
|
93
|
-
var _a;
|
|
94
92
|
const isVertical = FlowLayoutDefault.isVertical(layout);
|
|
95
93
|
const noInlineBlocks = transform.children.length === 1;
|
|
96
|
-
const lastChildOutput =
|
|
94
|
+
const lastChildOutput = transform.lastChild?.outputPoint;
|
|
97
95
|
const spacing = getDefaultSpacing(transform.entity, ConstantKeys.NODE_SPACING);
|
|
98
96
|
if (isVertical) {
|
|
99
97
|
return {
|
|
@@ -158,7 +156,6 @@ var BlockRegistry = {
|
|
|
158
156
|
hidden: true
|
|
159
157
|
},
|
|
160
158
|
getLines(transition) {
|
|
161
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
|
|
162
159
|
const currentTransform = transition.transform;
|
|
163
160
|
const { isVertical } = transition.entity;
|
|
164
161
|
const lines = [
|
|
@@ -173,9 +170,9 @@ var BlockRegistry = {
|
|
|
173
170
|
if (hasBranchDraggingAdder) {
|
|
174
171
|
if (isVertical) {
|
|
175
172
|
const currentOffsetRightX = currentTransform.firstChild ? currentTransform.firstChild.bounds.right : currentTransform.bounds.right;
|
|
176
|
-
const nextOffsetLeftX = (
|
|
173
|
+
const nextOffsetLeftX = (currentTransform.next?.firstChild ? currentTransform.next?.firstChild.bounds?.left : currentTransform.next?.bounds?.left) || 0;
|
|
177
174
|
const currentInputPointY = currentTransform.inputPoint.y;
|
|
178
|
-
if (currentTransform
|
|
175
|
+
if (currentTransform?.next) {
|
|
179
176
|
lines.push({
|
|
180
177
|
type: FlowTransitionLineEnum.DRAGGING_LINE,
|
|
181
178
|
from: currentTransform.parent.inputPoint,
|
|
@@ -188,9 +185,9 @@ var BlockRegistry = {
|
|
|
188
185
|
}
|
|
189
186
|
} else {
|
|
190
187
|
const currentOffsetBottomX = currentTransform.firstChild ? currentTransform.firstChild.bounds.bottom : currentTransform.bounds.bottom;
|
|
191
|
-
const nextOffsetTopX = (
|
|
188
|
+
const nextOffsetTopX = (currentTransform.next?.firstChild ? currentTransform.next?.firstChild.bounds?.top : currentTransform.next?.bounds?.top) || 0;
|
|
192
189
|
const currentInputPointX = currentTransform.inputPoint.x;
|
|
193
|
-
if (currentTransform
|
|
190
|
+
if (currentTransform?.next) {
|
|
194
191
|
lines.push({
|
|
195
192
|
type: FlowTransitionLineEnum.DRAGGING_LINE,
|
|
196
193
|
from: currentTransform.parent.inputPoint,
|
|
@@ -232,7 +229,6 @@ var BlockRegistry = {
|
|
|
232
229
|
};
|
|
233
230
|
},
|
|
234
231
|
getLabels(transition) {
|
|
235
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
236
232
|
const currentTransform = transition.transform;
|
|
237
233
|
const { isVertical } = transition.entity;
|
|
238
234
|
const draggingLabel = [];
|
|
@@ -240,9 +236,9 @@ var BlockRegistry = {
|
|
|
240
236
|
if (hasBranchDraggingAdder) {
|
|
241
237
|
if (isVertical) {
|
|
242
238
|
const currentOffsetRightX = currentTransform.firstChild ? currentTransform.firstChild.bounds.right : currentTransform.bounds.right;
|
|
243
|
-
const nextOffsetLeftX = (
|
|
239
|
+
const nextOffsetLeftX = (currentTransform.next?.firstChild ? currentTransform.next.firstChild.bounds?.left : currentTransform.next?.bounds?.left) || 0;
|
|
244
240
|
const currentInputPointY = currentTransform.inputPoint.y;
|
|
245
|
-
if (currentTransform
|
|
241
|
+
if (currentTransform?.next) {
|
|
246
242
|
draggingLabel.push({
|
|
247
243
|
offset: {
|
|
248
244
|
x: (currentOffsetRightX + nextOffsetLeftX) / 2,
|
|
@@ -257,9 +253,9 @@ var BlockRegistry = {
|
|
|
257
253
|
}
|
|
258
254
|
} else {
|
|
259
255
|
const currentOffsetBottomX = currentTransform.firstChild ? currentTransform.firstChild.bounds.bottom : currentTransform.bounds.bottom;
|
|
260
|
-
const nextOffsetTopX = (
|
|
256
|
+
const nextOffsetTopX = (currentTransform.next?.firstChild ? currentTransform.next.firstChild.bounds?.top : currentTransform.next?.bounds?.top) || 0;
|
|
261
257
|
const currentInputPointX = currentTransform.inputPoint.x;
|
|
262
|
-
if (currentTransform
|
|
258
|
+
if (currentTransform?.next) {
|
|
263
259
|
draggingLabel.push({
|
|
264
260
|
offset: {
|
|
265
261
|
x: currentInputPointX,
|
|
@@ -318,9 +314,8 @@ var InlineBlocksRegistry = {
|
|
|
318
314
|
* @param child
|
|
319
315
|
*/
|
|
320
316
|
getChildDelta(child, layout) {
|
|
321
|
-
var _a;
|
|
322
317
|
const isVertical = FlowLayoutDefault3.isVertical(layout);
|
|
323
|
-
const preTransform =
|
|
318
|
+
const preTransform = child.entity.pre?.getData(FlowNodeTransformData);
|
|
324
319
|
if (preTransform) {
|
|
325
320
|
const { localBounds: preBounds } = preTransform;
|
|
326
321
|
if (isVertical) {
|
|
@@ -357,7 +352,6 @@ var InlineBlocksRegistry = {
|
|
|
357
352
|
* @param trans
|
|
358
353
|
*/
|
|
359
354
|
getDelta(trans, layout) {
|
|
360
|
-
var _a, _b, _c, _d;
|
|
361
355
|
const isVertical = FlowLayoutDefault3.isVertical(layout);
|
|
362
356
|
const { pre, collapsed } = trans;
|
|
363
357
|
if (collapsed) {
|
|
@@ -365,8 +359,8 @@ var InlineBlocksRegistry = {
|
|
|
365
359
|
}
|
|
366
360
|
if (isVertical) {
|
|
367
361
|
const preCenter2 = pre.localBounds.center.x;
|
|
368
|
-
const firstBlockX =
|
|
369
|
-
const lastBlockX =
|
|
362
|
+
const firstBlockX = trans.firstChild?.transform.position.x || 0;
|
|
363
|
+
const lastBlockX = trans.lastChild?.transform.position.x || 0;
|
|
370
364
|
const currentCenter2 = (lastBlockX - firstBlockX) / 2;
|
|
371
365
|
return {
|
|
372
366
|
x: preCenter2 - currentCenter2,
|
|
@@ -374,8 +368,8 @@ var InlineBlocksRegistry = {
|
|
|
374
368
|
};
|
|
375
369
|
}
|
|
376
370
|
const preCenter = pre.localBounds.center.y;
|
|
377
|
-
const firstBlockY =
|
|
378
|
-
const lastBlockY =
|
|
371
|
+
const firstBlockY = trans.firstChild?.transform.position.y || 0;
|
|
372
|
+
const lastBlockY = trans.lastChild?.transform.position.y || 0;
|
|
379
373
|
const currentCenter = (lastBlockY - firstBlockY) / 2;
|
|
380
374
|
return {
|
|
381
375
|
x: 0,
|
|
@@ -390,39 +384,36 @@ var InlineBlocksRegistry = {
|
|
|
390
384
|
},
|
|
391
385
|
// 和前序节点对齐
|
|
392
386
|
getInputPoint(transform, layout) {
|
|
393
|
-
var _a, _b;
|
|
394
387
|
const isVertical = FlowLayoutDefault3.isVertical(layout);
|
|
395
388
|
if (isVertical) {
|
|
396
389
|
return {
|
|
397
|
-
x:
|
|
390
|
+
x: transform.pre?.outputPoint.x || 0,
|
|
398
391
|
y: transform.bounds.top
|
|
399
392
|
};
|
|
400
393
|
}
|
|
401
394
|
return {
|
|
402
395
|
x: transform.bounds.left,
|
|
403
|
-
y:
|
|
396
|
+
y: transform.pre?.outputPoint.y || 0
|
|
404
397
|
};
|
|
405
398
|
},
|
|
406
399
|
getOutputPoint(transform, layout) {
|
|
407
|
-
var _a, _b;
|
|
408
400
|
const isVertical = FlowLayoutDefault3.isVertical(layout);
|
|
409
401
|
if (transform.collapsed) {
|
|
410
402
|
return transform.inputPoint;
|
|
411
403
|
}
|
|
412
404
|
if (isVertical) {
|
|
413
405
|
return {
|
|
414
|
-
x:
|
|
406
|
+
x: transform.pre?.outputPoint.x || 0,
|
|
415
407
|
y: transform.bounds.bottom
|
|
416
408
|
};
|
|
417
409
|
}
|
|
418
410
|
return {
|
|
419
411
|
x: transform.bounds.right,
|
|
420
|
-
y:
|
|
412
|
+
y: transform.pre?.outputPoint.y || 0
|
|
421
413
|
};
|
|
422
414
|
}
|
|
423
415
|
};
|
|
424
416
|
function getBranchAdderLabel(transition) {
|
|
425
|
-
var _a;
|
|
426
417
|
const { isVertical } = transition.entity;
|
|
427
418
|
const currentTransform = transition.transform;
|
|
428
419
|
if (currentTransform.collapsed) {
|
|
@@ -446,7 +437,7 @@ function getBranchAdderLabel(transition) {
|
|
|
446
437
|
activated: transition.entity.getData(FlowNodeRenderData).activated,
|
|
447
438
|
transform: currentTransform,
|
|
448
439
|
// 传给外部使用的 node 信息
|
|
449
|
-
node:
|
|
440
|
+
node: currentTransform.originParent?.entity
|
|
450
441
|
}
|
|
451
442
|
}
|
|
452
443
|
];
|
|
@@ -515,7 +506,7 @@ var BlockOrderIconRegistry = {
|
|
|
515
506
|
const nextTransform = currentTransform.next;
|
|
516
507
|
const parentTransform = currentTransform.parent;
|
|
517
508
|
if (transition.entity.parent.collapsedChildren.length <= 1) {
|
|
518
|
-
const parentOutput = parentTransform
|
|
509
|
+
const parentOutput = parentTransform?.outputPoint;
|
|
519
510
|
return [
|
|
520
511
|
{
|
|
521
512
|
offset: parentOutput,
|
|
@@ -677,7 +668,6 @@ var CatchInlineBlocksRegistry = {
|
|
|
677
668
|
return firstChild.originDeltaX;
|
|
678
669
|
},
|
|
679
670
|
getLabels(transition) {
|
|
680
|
-
var _a;
|
|
681
671
|
const { inputPoint } = transition.transform;
|
|
682
672
|
const { isVertical } = transition.entity;
|
|
683
673
|
const currentTransform = transition.transform;
|
|
@@ -698,7 +688,7 @@ var CatchInlineBlocksRegistry = {
|
|
|
698
688
|
activated: transition.entity.getData(FlowNodeRenderData2).activated,
|
|
699
689
|
transform: currentTransform,
|
|
700
690
|
// 传给外部使用的 node 信息
|
|
701
|
-
node:
|
|
691
|
+
node: currentTransform.originParent?.entity
|
|
702
692
|
}
|
|
703
693
|
}
|
|
704
694
|
];
|
|
@@ -712,7 +702,6 @@ var CatchInlineBlocksRegistry = {
|
|
|
712
702
|
return isVertical ? transform.bounds.topCenter : transform.bounds.rightCenter;
|
|
713
703
|
},
|
|
714
704
|
getOutputPoint(transform, layout) {
|
|
715
|
-
var _a, _b;
|
|
716
705
|
const isVertical = FlowLayoutDefault4.isVertical(layout);
|
|
717
706
|
if (transform.collapsed) {
|
|
718
707
|
return transform.inputPoint;
|
|
@@ -720,11 +709,11 @@ var CatchInlineBlocksRegistry = {
|
|
|
720
709
|
const firstCatchBlock = transform.firstChild;
|
|
721
710
|
if (firstCatchBlock) {
|
|
722
711
|
return isVertical ? {
|
|
723
|
-
x:
|
|
712
|
+
x: firstCatchBlock.outputPoint?.x,
|
|
724
713
|
y: transform.bounds.bottom
|
|
725
714
|
} : {
|
|
726
715
|
x: transform.bounds.right,
|
|
727
|
-
y:
|
|
716
|
+
y: firstCatchBlock.outputPoint?.y
|
|
728
717
|
};
|
|
729
718
|
}
|
|
730
719
|
return isVertical ? transform.bounds.bottomCenter : transform.bounds.rightCenter;
|
|
@@ -761,7 +750,6 @@ var MainInlineBlocksRegistry = {
|
|
|
761
750
|
return lines;
|
|
762
751
|
},
|
|
763
752
|
getLabels(transition) {
|
|
764
|
-
var _a;
|
|
765
753
|
const { transform } = transition;
|
|
766
754
|
const { isVertical } = transition.entity;
|
|
767
755
|
const catchInlineBlocks = transform.children[1];
|
|
@@ -795,7 +783,7 @@ var MainInlineBlocksRegistry = {
|
|
|
795
783
|
y: errorLabelY
|
|
796
784
|
},
|
|
797
785
|
props: {
|
|
798
|
-
node:
|
|
786
|
+
node: transform.lastChild?.entity
|
|
799
787
|
}
|
|
800
788
|
}
|
|
801
789
|
];
|
|
@@ -822,8 +810,7 @@ var MainInlineBlocksRegistry = {
|
|
|
822
810
|
return void 0;
|
|
823
811
|
},
|
|
824
812
|
getChildDelta(child, layout) {
|
|
825
|
-
|
|
826
|
-
const preTransform = (_a = child.entity.pre) == null ? void 0 : _a.getData(FlowNodeTransformData2);
|
|
813
|
+
const preTransform = child.entity.pre?.getData(FlowNodeTransformData2);
|
|
827
814
|
const isVertical = FlowLayoutDefault5.isVertical(layout);
|
|
828
815
|
if (preTransform) {
|
|
829
816
|
const { localBounds: preBounds } = preTransform;
|
|
@@ -1013,7 +1000,7 @@ var TryCatchRegistry = {
|
|
|
1013
1000
|
if (blockData.blocks) {
|
|
1014
1001
|
node.document.addBlocksAsChildren(block, blockData.blocks || [], addedNodes);
|
|
1015
1002
|
}
|
|
1016
|
-
addedNodes
|
|
1003
|
+
addedNodes?.push(block, blockOrderIcon);
|
|
1017
1004
|
return block;
|
|
1018
1005
|
},
|
|
1019
1006
|
getInputPoint(transform) {
|
|
@@ -1267,7 +1254,6 @@ var LoopInlineBlocksNodeRegistry = {
|
|
|
1267
1254
|
];
|
|
1268
1255
|
},
|
|
1269
1256
|
getLabels(transition) {
|
|
1270
|
-
var _a;
|
|
1271
1257
|
const currentTransform = transition.transform;
|
|
1272
1258
|
const { isVertical } = transition.entity;
|
|
1273
1259
|
const labels = [];
|
|
@@ -1276,7 +1262,7 @@ var LoopInlineBlocksNodeRegistry = {
|
|
|
1276
1262
|
}
|
|
1277
1263
|
const leftBlockTransform = currentTransform.children[0];
|
|
1278
1264
|
const rightBlockTransform = currentTransform.children[1];
|
|
1279
|
-
if (
|
|
1265
|
+
if (transition.entity.originParent?.id.startsWith("while_")) {
|
|
1280
1266
|
labels.push({
|
|
1281
1267
|
type: FlowTransitionLabelEnum10.TEXT_LABEL,
|
|
1282
1268
|
renderKey: FlowTextKey2.LOOP_WHILE_TEXT,
|
|
@@ -1414,31 +1400,29 @@ var LoopRegistry = {
|
|
|
1414
1400
|
},
|
|
1415
1401
|
// 和前序节点对齐
|
|
1416
1402
|
getInputPoint(transform) {
|
|
1417
|
-
var _a, _b, _c, _d;
|
|
1418
1403
|
const { isVertical } = transform.entity;
|
|
1419
1404
|
if (isVertical) {
|
|
1420
1405
|
return {
|
|
1421
|
-
x:
|
|
1406
|
+
x: transform.pre?.outputPoint.x || transform.firstChild?.outputPoint.x || 0,
|
|
1422
1407
|
y: transform.bounds.top
|
|
1423
1408
|
};
|
|
1424
1409
|
}
|
|
1425
1410
|
return {
|
|
1426
1411
|
x: transform.bounds.left,
|
|
1427
|
-
y:
|
|
1412
|
+
y: transform.pre?.outputPoint.y || transform.firstChild?.outputPoint.y || 0
|
|
1428
1413
|
};
|
|
1429
1414
|
},
|
|
1430
1415
|
getOutputPoint(transform) {
|
|
1431
|
-
var _a, _b, _c, _d;
|
|
1432
1416
|
const { isVertical } = transform.entity;
|
|
1433
1417
|
if (isVertical) {
|
|
1434
1418
|
return {
|
|
1435
|
-
x:
|
|
1419
|
+
x: transform.pre?.outputPoint.x || transform.firstChild?.outputPoint.x || 0,
|
|
1436
1420
|
y: transform.bounds.bottom
|
|
1437
1421
|
};
|
|
1438
1422
|
}
|
|
1439
1423
|
return {
|
|
1440
1424
|
x: transform.bounds.right,
|
|
1441
|
-
y:
|
|
1425
|
+
y: transform.pre?.outputPoint.y || transform.firstChild?.outputPoint.y || 0
|
|
1442
1426
|
};
|
|
1443
1427
|
},
|
|
1444
1428
|
extendChildRegistries: [
|
|
@@ -1477,12 +1461,10 @@ var RootRegistry = {
|
|
|
1477
1461
|
hidden: true
|
|
1478
1462
|
},
|
|
1479
1463
|
getInputPoint(transform) {
|
|
1480
|
-
|
|
1481
|
-
return ((_a = transform.firstChild) == null ? void 0 : _a.inputPoint) || transform.bounds.topCenter;
|
|
1464
|
+
return transform.firstChild?.inputPoint || transform.bounds.topCenter;
|
|
1482
1465
|
},
|
|
1483
1466
|
getOutputPoint(transform) {
|
|
1484
|
-
|
|
1485
|
-
return ((_a = transform.firstChild) == null ? void 0 : _a.outputPoint) || transform.bounds.bottomCenter;
|
|
1467
|
+
return transform.firstChild?.outputPoint || transform.bounds.bottomCenter;
|
|
1486
1468
|
}
|
|
1487
1469
|
};
|
|
1488
1470
|
|
|
@@ -1563,7 +1545,6 @@ var InputRegistry = {
|
|
|
1563
1545
|
hidden: false
|
|
1564
1546
|
},
|
|
1565
1547
|
getLines(transition, layout) {
|
|
1566
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
|
|
1567
1548
|
const currentTransform = transition.transform;
|
|
1568
1549
|
const { isVertical } = transition.entity;
|
|
1569
1550
|
const lines = [];
|
|
@@ -1571,9 +1552,9 @@ var InputRegistry = {
|
|
|
1571
1552
|
if (hasBranchDraggingAdder) {
|
|
1572
1553
|
if (isVertical) {
|
|
1573
1554
|
const currentOffsetRightX = currentTransform.firstChild ? currentTransform.firstChild.bounds.right : currentTransform.bounds.right;
|
|
1574
|
-
const nextOffsetLeftX = (
|
|
1555
|
+
const nextOffsetLeftX = (currentTransform.next?.firstChild ? currentTransform.next?.firstChild.bounds?.left : currentTransform.next?.bounds?.left) || 0;
|
|
1575
1556
|
const currentInputPointY = currentTransform.outputPoint.y;
|
|
1576
|
-
if (currentTransform
|
|
1557
|
+
if (currentTransform?.next) {
|
|
1577
1558
|
lines.push({
|
|
1578
1559
|
type: FlowTransitionLineEnum6.MERGE_LINE,
|
|
1579
1560
|
isDraggingLine: true,
|
|
@@ -1587,9 +1568,9 @@ var InputRegistry = {
|
|
|
1587
1568
|
}
|
|
1588
1569
|
} else {
|
|
1589
1570
|
const currentOffsetBottomX = currentTransform.firstChild ? currentTransform.firstChild.bounds.bottom : currentTransform.bounds.bottom;
|
|
1590
|
-
const nextOffsetTopX = (
|
|
1571
|
+
const nextOffsetTopX = (currentTransform.next?.firstChild ? currentTransform.next?.firstChild.bounds?.top : currentTransform.next?.bounds?.top) || 0;
|
|
1591
1572
|
const currentInputPointX = currentTransform.outputPoint.x;
|
|
1592
|
-
if (currentTransform
|
|
1573
|
+
if (currentTransform?.next) {
|
|
1593
1574
|
lines.push({
|
|
1594
1575
|
type: FlowTransitionLineEnum6.MERGE_LINE,
|
|
1595
1576
|
isDraggingLine: true,
|
|
@@ -1614,7 +1595,6 @@ var InputRegistry = {
|
|
|
1614
1595
|
return lines;
|
|
1615
1596
|
},
|
|
1616
1597
|
getLabels(transition) {
|
|
1617
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
1618
1598
|
const currentTransform = transition.transform;
|
|
1619
1599
|
const { isVertical } = transition.entity;
|
|
1620
1600
|
const draggingLabel = [];
|
|
@@ -1622,9 +1602,9 @@ var InputRegistry = {
|
|
|
1622
1602
|
if (hasBranchDraggingAdder) {
|
|
1623
1603
|
if (isVertical) {
|
|
1624
1604
|
const currentOffsetRightX = currentTransform.firstChild ? currentTransform.firstChild.bounds.right : currentTransform.bounds.right;
|
|
1625
|
-
const nextOffsetLeftX = (
|
|
1605
|
+
const nextOffsetLeftX = (currentTransform.next?.firstChild ? currentTransform.next.firstChild.bounds?.left : currentTransform.next?.bounds?.left) || 0;
|
|
1626
1606
|
const currentInputPointY = currentTransform.outputPoint.y;
|
|
1627
|
-
if (currentTransform
|
|
1607
|
+
if (currentTransform?.next) {
|
|
1628
1608
|
draggingLabel.push({
|
|
1629
1609
|
offset: {
|
|
1630
1610
|
x: (currentOffsetRightX + nextOffsetLeftX) / 2,
|
|
@@ -1639,9 +1619,9 @@ var InputRegistry = {
|
|
|
1639
1619
|
}
|
|
1640
1620
|
} else {
|
|
1641
1621
|
const currentOffsetBottomX = currentTransform.firstChild ? currentTransform.firstChild.bounds.bottom : currentTransform.bounds.bottom;
|
|
1642
|
-
const nextOffsetTopX = (
|
|
1622
|
+
const nextOffsetTopX = (currentTransform.next?.firstChild ? currentTransform.next.firstChild.bounds?.top : currentTransform.next?.bounds?.top) || 0;
|
|
1643
1623
|
const currentInputPointX = currentTransform.outputPoint.x;
|
|
1644
|
-
if (currentTransform
|
|
1624
|
+
if (currentTransform?.next) {
|
|
1645
1625
|
draggingLabel.push({
|
|
1646
1626
|
offset: {
|
|
1647
1627
|
x: currentInputPointX,
|
|
@@ -1684,8 +1664,7 @@ var MultiOuputsRegistry = {
|
|
|
1684
1664
|
isNodeEnd: true
|
|
1685
1665
|
},
|
|
1686
1666
|
getLines: (transition, layout) => {
|
|
1687
|
-
|
|
1688
|
-
if (((_a = transition.entity.parent) == null ? void 0 : _a.flowNodeType) === FlowNodeBaseType21.INLINE_BLOCKS) {
|
|
1667
|
+
if (transition.entity.parent?.flowNodeType === FlowNodeBaseType21.INLINE_BLOCKS) {
|
|
1689
1668
|
return BlockRegistry.getLines(transition, layout);
|
|
1690
1669
|
}
|
|
1691
1670
|
return [];
|
|
@@ -1695,9 +1674,8 @@ var MultiOuputsRegistry = {
|
|
|
1695
1674
|
...BlockRegistry.getLabels(transition, layout)
|
|
1696
1675
|
],
|
|
1697
1676
|
getOutputPoint(transform, layout) {
|
|
1698
|
-
var _a;
|
|
1699
1677
|
const isVertical = FlowLayoutDefault7.isVertical(layout);
|
|
1700
|
-
const lastChildOutput =
|
|
1678
|
+
const lastChildOutput = transform.lastChild?.outputPoint;
|
|
1701
1679
|
if (isVertical) {
|
|
1702
1680
|
return {
|
|
1703
1681
|
x: lastChildOutput ? lastChildOutput.x : transform.bounds.center.x,
|
|
@@ -1753,7 +1731,6 @@ var MultiInputsRegistry = {
|
|
|
1753
1731
|
inlineSpacingPre: 0
|
|
1754
1732
|
},
|
|
1755
1733
|
getLabels(transition) {
|
|
1756
|
-
var _a, _b;
|
|
1757
1734
|
const isVertical = transition.entity.isVertical;
|
|
1758
1735
|
const currentTransform = transition.transform;
|
|
1759
1736
|
const spacing = getDefaultSpacing8(
|
|
@@ -1774,7 +1751,7 @@ var MultiInputsRegistry = {
|
|
|
1774
1751
|
activated: transition.entity.getData(FlowNodeRenderData3).activated,
|
|
1775
1752
|
transform: currentTransform,
|
|
1776
1753
|
// 传给外部使用的 node 信息
|
|
1777
|
-
node:
|
|
1754
|
+
node: currentTransform.originParent?.entity
|
|
1778
1755
|
}
|
|
1779
1756
|
}
|
|
1780
1757
|
];
|
|
@@ -1792,7 +1769,7 @@ var MultiInputsRegistry = {
|
|
|
1792
1769
|
activated: transition.entity.getData(FlowNodeRenderData3).activated,
|
|
1793
1770
|
transform: currentTransform,
|
|
1794
1771
|
// 传给外部使用的 node 信息
|
|
1795
|
-
node:
|
|
1772
|
+
node: currentTransform.originParent?.entity
|
|
1796
1773
|
}
|
|
1797
1774
|
}
|
|
1798
1775
|
];
|