You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: sites/docs/docs/tutorial/basic-class.en-US.md
+3-59Lines changed: 3 additions & 59 deletions
Original file line number
Diff line number
Diff line change
@@ -42,68 +42,12 @@ Inside LogicFlow, we think of a flowchart as a graph consisting of nodes and edg
42
42
43
43
`edges`: Contains all edges, connecting two nodes through `sourceNodeId` and `targetNodeId`. Each edge's data attributes are detailed in the <ahref="../api/edgeModelApi.en-US.md#DataAttributes">EdgeModel</a>.
- Why does node text need to have coordinates, can't we just use the node's coordinates directly?
81
-
82
-
`text` can be used directly as a string, at this time, if it is the text of a node, we will automatically adopt the node coordinates as the node text coordinates, if it is the text of a connection, we will calculate a suitable coordinate as the node coordinates based on the different types of connections.
83
-
In some application scenarios, our text can be dragged, in order to keep the consistency, our LogicFlow exported text data will take the coordinates with it.
84
-
85
-
86
-
- Why are the connecting `startPoint`, `endPoint` data and `pointsList` duplicated?
87
45
88
-
Currently, LogicFlow has built-in `line`, `polyline`, and `bezier` lines, which all have `startPoint` and `endPoint` data. But the data exported by `line` will not take `pointsList` with it. For `polyline`, `pointsList` represents all points of the polyline. For `bezier`, `pointsList` represents `['start point', 'first control point', 'second control point', 'end point']`.
89
-
90
-
91
-
- What is `properties` used for?
92
-
93
-
The LogicFlow of `properties` is reserved for data used in specific business scenarios.
94
-
For example, in an approval flow scenario, we define a certain node, which passes, the node is green, and does not pass the node is red. Then the data description of the node could be.
95
-
```jsx | pure
96
-
{
97
-
type: 'apply',
98
-
properties: {
99
-
isPass: true
100
-
}
101
-
}
102
-
```
46
+
`type`: Indicates the type of node or edge, which can be a basic type built into LogicFlow such as `rect` or `polyline`, or a custom type defined by users based on these basic types.
103
47
104
-
- What is `type`?
48
+
`text`: `text` can represent either node text or edge text. For node text, the node coordinates are automatically used as the text coordinates. For edge text, an appropriate coordinate is computed based on the type of edge. In some scenarios, text positions can be adjusted and dragged. Therefore, our text data in LogicFlow provides coordinate attributes.
105
49
106
-
The `type` represents the type of the node or line, which can be not only LogicFlow's built-in base type such as `rect`, `polyline`, but also user-defined type based on the base type. -->
50
+
`properties`: Each node and edge has properties including node style, shape attributes, and business-specific properties reserved for particular business scenarios. Examples include node shape attributes like `width` and `height`, `style` attributes, and business-specific properties like `isPass`.
0 commit comments