@logicflow/core 1.1.0-alpha.3 → 1.1.0-alpha.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@logicflow/core",
3
- "version": "1.1.0-alpha.3",
3
+ "version": "1.1.0-alpha.4",
4
4
  "description": "LogicFlow core, to quickly build flowchart editor",
5
5
  "main": "dist/logic-flow.js",
6
6
  "unpkg": "dist/logic-flow.js",
@@ -271,6 +271,22 @@ export default class LogicFlow {
271
271
  * @returns EdgeData
272
272
  */
273
273
  getEdgeDataById(edgeId: string): EdgeData;
274
+ /**
275
+ * 获取所有以此节点为终点的边
276
+ */
277
+ getNodeIncomingEdge(nodeId: any): any[];
278
+ /**
279
+ * 获取所有以此节点为起点的边
280
+ */
281
+ getNodeOutgoingEdge(nodeId: any): any[];
282
+ /**
283
+ * 获取节点连接到的所有起始节点
284
+ */
285
+ getNodeIncomingNode(nodeId: any): any[];
286
+ /**
287
+ * 获取节点连接到的所有目标节点
288
+ */
289
+ getNodeOutgoingNode(nodeId: any): any[];
274
290
  /**
275
291
  * 显示节点、连线文本编辑框
276
292
  * @param id 元素id
@@ -53,6 +53,7 @@ interface IBaseModel {
53
53
  * 元素是否被选中
54
54
  */
55
55
  isSelected: boolean;
56
+ visible: boolean;
56
57
  /**
57
58
  * 元素堆叠是层级,默认情况下节点zIndex值为1,边zIndex为0。
58
59
  * todo:写完善
@@ -381,6 +381,22 @@ declare class GraphModel {
381
381
  * @param type 边类型
382
382
  */
383
383
  changeEdgeType(id: any, type: any): void;
384
+ /**
385
+ * 获取所有以此节点为终点的边
386
+ */
387
+ getNodeIncomingEdge(nodeId: any): any[];
388
+ /**
389
+ * 获取所有以此节点为起点的边
390
+ */
391
+ getNodeOutgoingEdge(nodeId: any): any[];
392
+ /**
393
+ * 获取节点连接到的所有起始节点
394
+ */
395
+ getNodeIncomingNode(nodeId: any): any[];
396
+ /**
397
+ * 获取节点连接到的所有目标节点
398
+ */
399
+ getNodeOutgoingNode(nodeId: any): any[];
384
400
  /**
385
401
  * 设置主题
386
402
  * todo docs link
@@ -24,6 +24,7 @@ declare class BaseEdgeModel implements IBaseModel {
24
24
  isHovered: boolean;
25
25
  isHitable: boolean;
26
26
  draggable: boolean;
27
+ visible: boolean;
27
28
  graphModel: GraphModel;
28
29
  zIndex: number;
29
30
  readonly BaseType = ElementType.EDGE;
@@ -43,9 +43,11 @@ export default class BaseNodeModel implements IBaseNodeModel {
43
43
  isDragging: boolean;
44
44
  isHitable: boolean;
45
45
  draggable: boolean;
46
+ visible: boolean;
46
47
  graphModel: GraphModel;
47
48
  zIndex: number;
48
49
  state: number;
50
+ autoToFront: boolean;
49
51
  readonly BaseType = ElementType.NODE;
50
52
  modelType: ModelType;
51
53
  additionStateData: AdditionData;
@@ -161,8 +163,8 @@ export default class BaseNodeModel implements IBaseNodeModel {
161
163
  getBounds(): Bounds;
162
164
  get anchors(): PointAnchor[];
163
165
  addNodeMoveRules(fn: NodeMoveRule): void;
164
- move(deltaX: any, deltaY: any, isignoreRule?: boolean): void;
165
- moveTo(x: any, y: any, isignoreRule?: boolean): void;
166
+ move(deltaX: any, deltaY: any, isignoreRule?: boolean): boolean;
167
+ moveTo(x: any, y: any, isignoreRule?: boolean): boolean;
166
168
  moveText(deltaX: any, deltaY: any): void;
167
169
  updateText(value: string): void;
168
170
  setSelected(flag?: boolean): void;