@flowgram.ai/document 1.0.2 → 1.0.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.
- 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/index.d.mts
CHANGED
|
@@ -175,6 +175,7 @@ declare const ConstantKeys: {
|
|
|
175
175
|
INLINE_BLOCKS_PADDING_TOP: string;
|
|
176
176
|
NODE_SPACING: string;
|
|
177
177
|
BRANCH_SPACING: string;
|
|
178
|
+
ROUNDED_LINE_RADIUS: string;
|
|
178
179
|
ROUNDED_LINE_X_RADIUS: string;
|
|
179
180
|
ROUNDED_LINE_Y_RADIUS: string;
|
|
180
181
|
INLINE_BLOCKS_PADDING_BOTTOM: string;
|
|
@@ -1060,6 +1061,10 @@ declare const DefaultSpacingKey: {
|
|
|
1060
1061
|
* 分支节点间距
|
|
1061
1062
|
*/
|
|
1062
1063
|
BRANCH_SPACING: string;
|
|
1064
|
+
/**
|
|
1065
|
+
* 圆弧线条拐角 radius
|
|
1066
|
+
*/
|
|
1067
|
+
ROUNDED_LINE_RADIUS: string;
|
|
1063
1068
|
/**
|
|
1064
1069
|
* 圆弧线条 x radius
|
|
1065
1070
|
*/
|
|
@@ -1090,6 +1095,7 @@ declare const DEFAULT_SPACING: {
|
|
|
1090
1095
|
[DefaultSpacingKey.BRANCH_SPACING]: number;
|
|
1091
1096
|
[DefaultSpacingKey.INLINE_BLOCKS_PADDING_BOTTOM]: number;
|
|
1092
1097
|
[DefaultSpacingKey.COLLAPSED_SPACING]: number;
|
|
1098
|
+
[DefaultSpacingKey.ROUNDED_LINE_RADIUS]: number;
|
|
1093
1099
|
[DefaultSpacingKey.ROUNDED_LINE_X_RADIUS]: number;
|
|
1094
1100
|
[DefaultSpacingKey.ROUNDED_LINE_Y_RADIUS]: number;
|
|
1095
1101
|
[DefaultSpacingKey.HOVER_AREA_WIDTH]: number;
|
package/dist/index.d.ts
CHANGED
|
@@ -175,6 +175,7 @@ declare const ConstantKeys: {
|
|
|
175
175
|
INLINE_BLOCKS_PADDING_TOP: string;
|
|
176
176
|
NODE_SPACING: string;
|
|
177
177
|
BRANCH_SPACING: string;
|
|
178
|
+
ROUNDED_LINE_RADIUS: string;
|
|
178
179
|
ROUNDED_LINE_X_RADIUS: string;
|
|
179
180
|
ROUNDED_LINE_Y_RADIUS: string;
|
|
180
181
|
INLINE_BLOCKS_PADDING_BOTTOM: string;
|
|
@@ -1060,6 +1061,10 @@ declare const DefaultSpacingKey: {
|
|
|
1060
1061
|
* 分支节点间距
|
|
1061
1062
|
*/
|
|
1062
1063
|
BRANCH_SPACING: string;
|
|
1064
|
+
/**
|
|
1065
|
+
* 圆弧线条拐角 radius
|
|
1066
|
+
*/
|
|
1067
|
+
ROUNDED_LINE_RADIUS: string;
|
|
1063
1068
|
/**
|
|
1064
1069
|
* 圆弧线条 x radius
|
|
1065
1070
|
*/
|
|
@@ -1090,6 +1095,7 @@ declare const DEFAULT_SPACING: {
|
|
|
1090
1095
|
[DefaultSpacingKey.BRANCH_SPACING]: number;
|
|
1091
1096
|
[DefaultSpacingKey.INLINE_BLOCKS_PADDING_BOTTOM]: number;
|
|
1092
1097
|
[DefaultSpacingKey.COLLAPSED_SPACING]: number;
|
|
1098
|
+
[DefaultSpacingKey.ROUNDED_LINE_RADIUS]: number;
|
|
1093
1099
|
[DefaultSpacingKey.ROUNDED_LINE_X_RADIUS]: number;
|
|
1094
1100
|
[DefaultSpacingKey.ROUNDED_LINE_Y_RADIUS]: number;
|
|
1095
1101
|
[DefaultSpacingKey.HOVER_AREA_WIDTH]: number;
|
package/dist/index.js
CHANGED
|
@@ -157,6 +157,10 @@ var DefaultSpacingKey = {
|
|
|
157
157
|
* 分支节点间距
|
|
158
158
|
*/
|
|
159
159
|
BRANCH_SPACING: "BRANCH_SPACING",
|
|
160
|
+
/**
|
|
161
|
+
* 圆弧线条拐角 radius
|
|
162
|
+
*/
|
|
163
|
+
ROUNDED_LINE_RADIUS: "ROUNDED_LINE_RADIUS",
|
|
160
164
|
/**
|
|
161
165
|
* 圆弧线条 x radius
|
|
162
166
|
*/
|
|
@@ -203,6 +207,8 @@ var DEFAULT_SPACING = {
|
|
|
203
207
|
// 分支间最小边距 (水平布局)
|
|
204
208
|
[DefaultSpacingKey.COLLAPSED_SPACING]: 12,
|
|
205
209
|
// 复合节点距离上个节点的距离
|
|
210
|
+
[DefaultSpacingKey.ROUNDED_LINE_RADIUS]: 16,
|
|
211
|
+
// 圆弧线条拐角 radius
|
|
206
212
|
[DefaultSpacingKey.ROUNDED_LINE_X_RADIUS]: 16,
|
|
207
213
|
// 圆弧线条 x radius
|
|
208
214
|
[DefaultSpacingKey.ROUNDED_LINE_Y_RADIUS]: 20,
|
|
@@ -752,8 +758,9 @@ var drawLineToNext = (transition) => {
|
|
|
752
758
|
var drawLineToBottom = (transition) => {
|
|
753
759
|
const { transform } = transition;
|
|
754
760
|
const currentOutput = transform.outputPoint;
|
|
761
|
+
const isParentRoot = transform.parent?.entity.flowNodeType === "root" /* ROOT */;
|
|
755
762
|
const parentOutput = transform.parent?.outputPoint;
|
|
756
|
-
if (!transform.next && parentOutput && !new import_utils3.Point().copyFrom(currentOutput).equals(parentOutput) && !transition.isNodeEnd) {
|
|
763
|
+
if (!isParentRoot && !transform.next && parentOutput && !new import_utils3.Point().copyFrom(currentOutput).equals(parentOutput) && !transition.isNodeEnd) {
|
|
757
764
|
return [
|
|
758
765
|
{
|
|
759
766
|
type: 0 /* STRAIGHT_LINE */,
|