@logicflow/core 1.1.21 → 1.1.24

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.21",
3
+ "version": "1.1.24",
4
4
  "description": "LogicFlow core, to quickly build flowchart editor",
5
5
  "main": "dist/entry.js",
6
6
  "module": "dist/logic-flow.js",
@@ -338,7 +338,7 @@ export default class LogicFlow {
338
338
  * @param leftTopPoint 区域左上角坐标, dom层坐标
339
339
  * @param rightBottomPoint 区域右下角坐标,dom层坐标
340
340
  */
341
- getAreaElement(leftTopPoint: PointTuple, rightBottomPoint: PointTuple, wholeEdge?: boolean, wholeNode?: boolean): any[];
341
+ getAreaElement(leftTopPoint: PointTuple, rightBottomPoint: PointTuple, wholeEdge?: boolean, wholeNode?: boolean, ignoreHideElement?: boolean): any[];
342
342
  /**
343
343
  * 获取选中的元素数据
344
344
  * @param isIgnoreCheck 是否包括sourceNode和targetNode没有被选中的边,默认包括。
@@ -53,7 +53,14 @@ interface IBaseModel {
53
53
  * 元素是否被选中
54
54
  */
55
55
  isSelected: boolean;
56
+ /**
57
+ * 节点是否显示
58
+ */
56
59
  visible: boolean;
60
+ /**
61
+ * 节点是否可以通过getGraphData获取
62
+ */
63
+ virtual: boolean;
57
64
  /**
58
65
  * 元素堆叠是层级,默认情况下节点zIndex值为1,边zIndex为0。
59
66
  * todo:写完善
@@ -142,8 +142,9 @@ declare class GraphModel {
142
142
  * @param rightBottomPoint 表示区域右下角的点
143
143
  * @param wholeEdge 是否要整个边都在区域内部
144
144
  * @param wholeNode 是否要整个节点都在区域内部
145
+ * @param ignoreHideElement 是否忽略隐藏的节点
145
146
  */
146
- getAreaElement(leftTopPoint: PointTuple, rightBottomPoint: PointTuple, wholeEdge?: boolean, wholeNode?: boolean): any[];
147
+ getAreaElement(leftTopPoint: PointTuple, rightBottomPoint: PointTuple, wholeEdge?: boolean, wholeNode?: boolean, ignoreHideElement?: boolean): any[];
147
148
  /**
148
149
  * 获取指定类型元素对应的Model
149
150
  */
@@ -25,6 +25,7 @@ declare class BaseEdgeModel implements IBaseModel {
25
25
  isHitable: boolean;
26
26
  draggable: boolean;
27
27
  visible: boolean;
28
+ virtual: boolean;
28
29
  isAnimation: boolean;
29
30
  graphModel: GraphModel;
30
31
  zIndex: number;
@@ -45,6 +45,7 @@ export default class BaseNodeModel implements IBaseNodeModel {
45
45
  isHitable: boolean;
46
46
  draggable: boolean;
47
47
  visible: boolean;
48
+ virtual: boolean;
48
49
  graphModel: GraphModel;
49
50
  zIndex: number;
50
51
  state: number;
@@ -183,8 +184,8 @@ export default class BaseNodeModel implements IBaseNodeModel {
183
184
  get anchors(): PointAnchor[];
184
185
  getAnchorInfo(anchorId: string): PointAnchor;
185
186
  addNodeMoveRules(fn: NodeMoveRule): void;
186
- move(deltaX: any, deltaY: any, isignoreRule?: boolean): boolean;
187
- moveTo(x: any, y: any, isignoreRule?: boolean): boolean;
187
+ move(deltaX: any, deltaY: any, isIgnoreRule?: boolean): boolean;
188
+ moveTo(x: any, y: any, isIgnoreRule?: boolean): boolean;
188
189
  moveText(deltaX: any, deltaY: any): void;
189
190
  updateText(value: string): void;
190
191
  setSelected(flag?: boolean): void;
@@ -0,0 +1,4 @@
1
+ import { DirectionVector2, Point } from '../type';
2
+ export declare const getDirectionVector: (point1: Point, point2: Point) => DirectionVector2;
3
+ export declare const isSameDirection: (v1: DirectionVector2, v2: DirectionVector2) => boolean;
4
+ export declare const isContraryDirection: (v1: DirectionVector2, v2: DirectionVector2) => boolean;