@flowgram.ai/document 1.0.1 → 1.0.3
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 +8 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.mts +6 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +8 -1
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
package/dist/esm/index.js
CHANGED
|
@@ -94,6 +94,10 @@ var DefaultSpacingKey = {
|
|
|
94
94
|
* 分支节点间距
|
|
95
95
|
*/
|
|
96
96
|
BRANCH_SPACING: "BRANCH_SPACING",
|
|
97
|
+
/**
|
|
98
|
+
* 圆弧线条拐角 radius
|
|
99
|
+
*/
|
|
100
|
+
ROUNDED_LINE_RADIUS: "ROUNDED_LINE_RADIUS",
|
|
97
101
|
/**
|
|
98
102
|
* 圆弧线条 x radius
|
|
99
103
|
*/
|
|
@@ -140,6 +144,8 @@ var DEFAULT_SPACING = {
|
|
|
140
144
|
// 分支间最小边距 (水平布局)
|
|
141
145
|
[DefaultSpacingKey.COLLAPSED_SPACING]: 12,
|
|
142
146
|
// 复合节点距离上个节点的距离
|
|
147
|
+
[DefaultSpacingKey.ROUNDED_LINE_RADIUS]: 16,
|
|
148
|
+
// 圆弧线条拐角 radius
|
|
143
149
|
[DefaultSpacingKey.ROUNDED_LINE_X_RADIUS]: 16,
|
|
144
150
|
// 圆弧线条 x radius
|
|
145
151
|
[DefaultSpacingKey.ROUNDED_LINE_Y_RADIUS]: 20,
|
|
@@ -693,8 +699,9 @@ var drawLineToNext = (transition) => {
|
|
|
693
699
|
var drawLineToBottom = (transition) => {
|
|
694
700
|
const { transform } = transition;
|
|
695
701
|
const currentOutput = transform.outputPoint;
|
|
702
|
+
const isParentRoot = transform.parent?.entity.flowNodeType === "root" /* ROOT */;
|
|
696
703
|
const parentOutput = transform.parent?.outputPoint;
|
|
697
|
-
if (!transform.next && parentOutput && !new Point().copyFrom(currentOutput).equals(parentOutput) && !transition.isNodeEnd) {
|
|
704
|
+
if (!isParentRoot && !transform.next && parentOutput && !new Point().copyFrom(currentOutput).equals(parentOutput) && !transition.isNodeEnd) {
|
|
698
705
|
return [
|
|
699
706
|
{
|
|
700
707
|
type: 0 /* STRAIGHT_LINE */,
|