@logicflow/core 1.2.0-alpha.4 → 1.2.0-alpha.5

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.2.0-alpha.4",
3
+ "version": "1.2.0-alpha.5",
4
4
  "description": "LogicFlow core, to quickly build flowchart editor",
5
5
  "main": "dist/logic-flow.js",
6
6
  "unpkg": "dist/logic-flow.js",
@@ -196,7 +196,14 @@ export default class BaseNodeModel implements IBaseNodeModel {
196
196
  setProperties(properties: any): void;
197
197
  setZIndex(zIndex?: number): void;
198
198
  /**
199
- * @deprecated 不推荐直接使用updateAttributes,请使用setProperties、updateText、move等方法更新节点属性。
199
+ * 设置节点属性;
200
+ * 支持属性请参考节点属性文档
201
+ * http://logic-flow.org/api/nodeModelApi.html#%E6%95%B0%E6%8D%AE%E5%B1%9E%E6%80%A7
202
+ * @example
203
+ * nodeModel.updateAttributes({
204
+ * width: 100,
205
+ * height: 100
206
+ * })
200
207
  */
201
208
  updateAttributes(attributes: any): void;
202
209
  }
@@ -26,8 +26,11 @@ export declare const isBboxOverLapping: (b1: PBBox, b2: PBBox) => boolean;
26
26
  export declare const filterRepeatPoints: (points: PolyPoint[]) => PolyPoint[];
27
27
  export declare const getSimplePolyline: (sPoint: PolyPoint, tPoint: PolyPoint) => PolyPoint[];
28
28
  export declare const getExpandedBBox: (bbox: PBBox, offset: number) => PBBox;
29
- export declare const pointDirection: (point: PolyPoint, bbox: PBBox) => Direction;
30
- export declare const getExpandedBBoxPoint: (bbox: PBBox, point: PolyPoint) => PolyPoint;
29
+ /**
30
+ * 判断点与中心点边的方向:是否水平,true水平,false垂直
31
+ */
32
+ export declare const pointDirection: (point: PolyPoint, node: BaseNode) => Direction;
33
+ export declare const getExpandedBBoxPoint: (bbox: PBBox, point: PolyPoint, direction: any) => PolyPoint;
31
34
  export declare const mergeBBox: (b1: PBBox, b2: PBBox) => PBBox;
32
35
  export declare const getBBoxOfPoints: (points?: PolyPoint[], offset?: number) => PBBox;
33
36
  export declare const getPointsFromBBox: (bbox: PBBox) => PolyPoint[];
@@ -46,6 +49,14 @@ export declare const getNextNeighborPoints: (points: PolyPoint[], point: PolyPoi
46
49
  export declare const pathFinder: (points: PolyPoint[], start: PolyPoint, goal: PolyPoint, sBBox: PBBox, tBBox: PBBox, os: PolyPoint, ot: PolyPoint) => PolyPoint[];
47
50
  export declare const getBoxByOriginNode: (node: BaseNode) => PBBox;
48
51
  export declare const pointFilter: (points: PolyPoint[]) => PolyPoint[];
52
+ /**
53
+ * 计算折线点
54
+ * @param start 连线的开始点坐标
55
+ * @param end 连线的结束点坐标
56
+ * @param sNode 连线连接的开始节点
57
+ * @param tNode 连线连接的结束节点
58
+ * @param offset 连线箭头距离
59
+ */
49
60
  export declare const getPolylinePoints: (start: PolyPoint, end: PolyPoint, sNode: BaseNode, tNode: BaseNode, offset: number) => PolyPoint[];
50
61
  /**
51
62
  * 获取折线中最长的一个线