@logicflow/core 1.2.0 → 1.2.2
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 +5 -8
- package/dist/logic-flow.js +128 -87
- package/dist/logic-flow.min.js +1 -1
- package/package.json +2 -2
- package/types/constant/DefaultTheme.d.ts +4 -22
- package/types/model/edge/BaseEdgeModel.d.ts +0 -1
- package/types/model/edge/BezierEdgeModel.d.ts +1 -1
- package/types/model/node/CircleNodeModel.d.ts +0 -1
- package/types/model/node/RectNodeModel.d.ts +0 -3
- package/types/model/node/TextNodeModel.d.ts +1 -1
- package/types/view/edge/AdjustPoint.d.ts +7 -2
- package/types/view/edge/BaseEdge.d.ts +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@logicflow/core",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.2",
|
|
4
4
|
"description": "LogicFlow core, to quickly build flowchart editor",
|
|
5
5
|
"main": "dist/entry.js",
|
|
6
6
|
"module": "dist/logic-flow.js",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"sideEffects": true,
|
|
9
9
|
"jsdelivr": "dist/logic-flow.min.js",
|
|
10
10
|
"license": "Apache-2.0",
|
|
11
|
-
"homepage": "
|
|
11
|
+
"homepage": "https://docs.logic-flow.cn",
|
|
12
12
|
"types": "types/index.d.ts",
|
|
13
13
|
"repository": {
|
|
14
14
|
"type": "git",
|
|
@@ -29,6 +29,8 @@ export declare type CommonTheme = {
|
|
|
29
29
|
* 我们会把你定义的所有属性最终传递到DOM上
|
|
30
30
|
* 详情请参考svg属性规范
|
|
31
31
|
* https://developer.mozilla.org/zh-CN/docs/Web/SVG/Attribute
|
|
32
|
+
* 注意: 请不要在主题中设置“形状属性”,例如:x、y、width、height、radius、r、rx、ry
|
|
33
|
+
* @see https://docs.logic-flow.cn/docs/#/zh/api/themeApi?id=%e5%bd%a2%e7%8a%b6%e5%b1%9e%e6%80%a7)
|
|
32
34
|
*/
|
|
33
35
|
[key: string]: any;
|
|
34
36
|
};
|
|
@@ -37,33 +39,13 @@ export declare type CommonTheme = {
|
|
|
37
39
|
* svg基础图形-矩形
|
|
38
40
|
* https://developer.mozilla.org/zh-CN/docs/Web/SVG/Element/rect
|
|
39
41
|
*/
|
|
40
|
-
export declare type RectTheme =
|
|
41
|
-
/**
|
|
42
|
-
* 矩形的默认宽度
|
|
43
|
-
*/
|
|
44
|
-
width?: number;
|
|
45
|
-
/**
|
|
46
|
-
* 矩形的默认高度
|
|
47
|
-
*/
|
|
48
|
-
height?: number;
|
|
49
|
-
/**
|
|
50
|
-
* 圆角
|
|
51
|
-
* 注意,矩形圆角请使用radius
|
|
52
|
-
* 不要使用rx和ry
|
|
53
|
-
*/
|
|
54
|
-
radius?: number;
|
|
55
|
-
} & CommonTheme;
|
|
42
|
+
export declare type RectTheme = CommonTheme;
|
|
56
43
|
/**
|
|
57
44
|
* circle主题样式
|
|
58
45
|
* svg基础图形-圆形
|
|
59
46
|
* https://developer.mozilla.org/zh-CN/docs/Web/SVG/Element/circle
|
|
60
47
|
*/
|
|
61
|
-
export declare type CircleTheme =
|
|
62
|
-
/**
|
|
63
|
-
* 默认半径
|
|
64
|
-
*/
|
|
65
|
-
r?: number;
|
|
66
|
-
} & CommonTheme;
|
|
48
|
+
export declare type CircleTheme = CommonTheme;
|
|
67
49
|
/**
|
|
68
50
|
* polygon主题样式
|
|
69
51
|
* svg基础图形-多边形
|
|
@@ -9,7 +9,7 @@ export default class BezierEdgeModel extends BaseEdgeModel {
|
|
|
9
9
|
getEdgeStyle(): {
|
|
10
10
|
[x: string]: any;
|
|
11
11
|
adjustLine?: import("../../constant/DefaultTheme").CommonTheme;
|
|
12
|
-
adjustAnchor?: import("../../constant/DefaultTheme").
|
|
12
|
+
adjustAnchor?: import("../../constant/DefaultTheme").CommonTheme;
|
|
13
13
|
fill?: string;
|
|
14
14
|
stroke?: string;
|
|
15
15
|
strokeWidth?: number;
|
|
@@ -10,7 +10,7 @@ declare class TextNodeModel extends BaseNodeModel {
|
|
|
10
10
|
stroke?: string;
|
|
11
11
|
strokeWidth?: number;
|
|
12
12
|
overflowMode?: string;
|
|
13
|
-
background?: import("../../constant/DefaultTheme").
|
|
13
|
+
background?: import("../../constant/DefaultTheme").CommonTheme;
|
|
14
14
|
};
|
|
15
15
|
get width(): number;
|
|
16
16
|
get height(): number;
|
|
@@ -3,6 +3,7 @@ import { BaseEdgeModel } from '../../model/edge';
|
|
|
3
3
|
import GraphModel from '../../model/GraphModel';
|
|
4
4
|
import { StepDrag } from '../../util/drag';
|
|
5
5
|
import { Point } from '../../type';
|
|
6
|
+
import { BaseNodeModel } from '../..';
|
|
6
7
|
interface IProps {
|
|
7
8
|
x: number;
|
|
8
9
|
y: number;
|
|
@@ -44,8 +45,12 @@ export default class AdjustPoint extends Component<IProps, IState> {
|
|
|
44
45
|
event: any;
|
|
45
46
|
}) => void;
|
|
46
47
|
recoveryEdge: () => void;
|
|
47
|
-
getAdjustPointStyle: () => import("../../constant/DefaultTheme").
|
|
48
|
-
isAllowAdjust(info: any):
|
|
48
|
+
getAdjustPointStyle: () => import("../../constant/DefaultTheme").CommonTheme;
|
|
49
|
+
isAllowAdjust(info: any): {
|
|
50
|
+
pass: boolean;
|
|
51
|
+
msg?: string;
|
|
52
|
+
newTargetNode: BaseNodeModel;
|
|
53
|
+
};
|
|
49
54
|
render(): h.JSX.Element;
|
|
50
55
|
}
|
|
51
56
|
export {};
|
|
@@ -80,7 +80,7 @@ export default class BaseEdge extends Component<IProps> {
|
|
|
80
80
|
* )
|
|
81
81
|
* }
|
|
82
82
|
*/
|
|
83
|
-
getAdjustPointShape
|
|
83
|
+
getAdjustPointShape(x: any, y: any, model: any): h.JSX.Element | null;
|
|
84
84
|
/**
|
|
85
85
|
* 不支持重写。请使用getAdjustPointShape
|
|
86
86
|
*/
|