@logicflow/core 1.0.0 → 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/README.md +10 -16
- package/dist/logic-flow.js +1 -1
- package/package.json +1 -1
- package/types/LogicFlow.d.ts +6 -0
- package/types/model/edge/BezierEdgeModel.d.ts +0 -1
- package/types/model/node/BaseNodeModel.d.ts +1 -1
- package/types/model/node/DiamondNodeModel.d.ts +5 -1
- package/types/model/node/EllipseNodeModel.d.ts +5 -2
- package/types/model/node/HtmlNodeModel.d.ts +5 -2
- package/types/model/node/PolygonNodeModel.d.ts +5 -1
- package/types/model/node/RectNodeModel.d.ts +5 -2
- package/types/model/node/TextNodeModel.d.ts +3 -2
- package/types/view/node/TextNode.d.ts +0 -1
package/package.json
CHANGED
package/types/LogicFlow.d.ts
CHANGED
|
@@ -141,6 +141,12 @@ export default class LogicFlow {
|
|
|
141
141
|
* @param type 节点类型
|
|
142
142
|
*/
|
|
143
143
|
changeNodeType(id: string, type: string): void;
|
|
144
|
+
/**
|
|
145
|
+
* 切换边的类型
|
|
146
|
+
* @param id 边Id
|
|
147
|
+
* @param type 边类型
|
|
148
|
+
*/
|
|
149
|
+
changeEdgeType(id: string, type: string): void;
|
|
144
150
|
/**
|
|
145
151
|
* 获取节点连接的所有边的model
|
|
146
152
|
* @param nodeId 节点ID
|
|
@@ -34,7 +34,6 @@ export default class BezierEdgeModel extends BaseEdgeModel {
|
|
|
34
34
|
private getPath;
|
|
35
35
|
initPoints(): void;
|
|
36
36
|
updatePoints(): void;
|
|
37
|
-
updatePath(): void;
|
|
38
37
|
updateStartPoint(anchor: any): void;
|
|
39
38
|
updateEndPoint(anchor: any): void;
|
|
40
39
|
updateAdjustAnchor(anchor: Point, type: string): void;
|
|
@@ -147,11 +147,11 @@ export default class BaseNodeModel implements IBaseNodeModel {
|
|
|
147
147
|
*/
|
|
148
148
|
getConnectedTargetRules(): ConnectRule[];
|
|
149
149
|
/**
|
|
150
|
-
* @overridable 子类重写此方法设置锚点
|
|
151
150
|
* @returns Point[] 锚点坐标构成的数组
|
|
152
151
|
*/
|
|
153
152
|
getAnchorsByOffset(): PointAnchor[];
|
|
154
153
|
/**
|
|
154
|
+
* @overridable 子类重写此方法设置默认锚点
|
|
155
155
|
* 获取节点默认情况下的锚点
|
|
156
156
|
*/
|
|
157
157
|
getDetaultAnchor(): PointAnchor[];
|
|
@@ -15,7 +15,11 @@ declare class DiamondNodeModel extends BaseNodeModel {
|
|
|
15
15
|
get pointsPosition(): Point[];
|
|
16
16
|
get width(): number;
|
|
17
17
|
get height(): number;
|
|
18
|
-
|
|
18
|
+
getDetaultAnchor(): {
|
|
19
|
+
x: number;
|
|
20
|
+
y: number;
|
|
21
|
+
id: string;
|
|
22
|
+
}[];
|
|
19
23
|
}
|
|
20
24
|
export { DiamondNodeModel };
|
|
21
25
|
export default DiamondNodeModel;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { Point } from '../../type';
|
|
2
1
|
import BaseNodeModel from './BaseNodeModel';
|
|
3
2
|
import { ModelType } from '../../constant/constant';
|
|
4
3
|
declare class EllipseNodeModel extends BaseNodeModel {
|
|
@@ -13,7 +12,11 @@ declare class EllipseNodeModel extends BaseNodeModel {
|
|
|
13
12
|
};
|
|
14
13
|
get width(): number;
|
|
15
14
|
get height(): number;
|
|
16
|
-
|
|
15
|
+
getDetaultAnchor(): {
|
|
16
|
+
x: number;
|
|
17
|
+
y: number;
|
|
18
|
+
id: string;
|
|
19
|
+
}[];
|
|
17
20
|
}
|
|
18
21
|
export { EllipseNodeModel };
|
|
19
22
|
export default EllipseNodeModel;
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
import { Point } from '../../type';
|
|
2
1
|
import BaseNodeModel from './BaseNodeModel';
|
|
3
2
|
import { ModelType } from '../../constant/constant';
|
|
4
3
|
declare class HtmlNodeModel extends BaseNodeModel {
|
|
5
4
|
modelType: ModelType;
|
|
6
|
-
|
|
5
|
+
getDetaultAnchor(): {
|
|
6
|
+
x: number;
|
|
7
|
+
y: number;
|
|
8
|
+
id: string;
|
|
9
|
+
}[];
|
|
7
10
|
}
|
|
8
11
|
export { HtmlNodeModel };
|
|
9
12
|
export default HtmlNodeModel;
|
|
@@ -18,7 +18,11 @@ declare class PolygonNodeModel extends BaseNodeModel {
|
|
|
18
18
|
get pointsPosition(): Point[];
|
|
19
19
|
get width(): number;
|
|
20
20
|
get height(): number;
|
|
21
|
-
|
|
21
|
+
getDetaultAnchor(): {
|
|
22
|
+
x: number;
|
|
23
|
+
y: number;
|
|
24
|
+
id: string;
|
|
25
|
+
}[];
|
|
22
26
|
}
|
|
23
27
|
export { PolygonNodeModel };
|
|
24
28
|
export default PolygonNodeModel;
|
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
import { Point } from '../../type';
|
|
2
1
|
import BaseNodeModel from './BaseNodeModel';
|
|
3
2
|
import { ModelType } from '../../constant/constant';
|
|
4
3
|
declare class RectNodeModel extends BaseNodeModel {
|
|
5
4
|
modelType: ModelType;
|
|
6
5
|
radius: number;
|
|
7
|
-
|
|
6
|
+
getDetaultAnchor(): {
|
|
7
|
+
x: number;
|
|
8
|
+
y: number;
|
|
9
|
+
id: string;
|
|
10
|
+
}[];
|
|
8
11
|
getNodeStyle(): {
|
|
9
12
|
[x: string]: any;
|
|
10
13
|
width?: number;
|
|
@@ -2,14 +2,15 @@ import BaseNodeModel from './BaseNodeModel';
|
|
|
2
2
|
import { ModelType } from '../../constant/constant';
|
|
3
3
|
declare class TextNodeModel extends BaseNodeModel {
|
|
4
4
|
modelType: ModelType;
|
|
5
|
-
|
|
6
|
-
getNodeStyle(): {
|
|
5
|
+
getTextStyle(): {
|
|
7
6
|
[x: string]: any;
|
|
8
7
|
color?: string;
|
|
9
8
|
fontSize?: number;
|
|
10
9
|
fill?: string;
|
|
11
10
|
stroke?: string;
|
|
12
11
|
strokeWidth?: number;
|
|
12
|
+
overflowMode?: string;
|
|
13
|
+
background?: import("../../constant/DefaultTheme").RectTheme;
|
|
13
14
|
};
|
|
14
15
|
get width(): number;
|
|
15
16
|
get height(): number;
|