@logicflow/core 1.1.2 → 1.1.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/dist/style/index.css
CHANGED
package/package.json
CHANGED
|
@@ -3,6 +3,7 @@ import { ModelType, ElementType } from '../../constant/constant';
|
|
|
3
3
|
import { AdditionData, NodeData, NodeConfig, NodeMoveRule, Bounds, AnchorConfig, PointAnchor, AnchorsOffsetItem, ShapeStyleAttribute } from '../../type';
|
|
4
4
|
import GraphModel from '../GraphModel';
|
|
5
5
|
import { IBaseModel } from '../BaseModel';
|
|
6
|
+
import { BaseEdgeModel } from '../edge';
|
|
6
7
|
export declare type ConnectRule = {
|
|
7
8
|
message: string;
|
|
8
9
|
validate: (source?: BaseNodeModel, target?: BaseNodeModel, sourceAnchor?: AnchorConfig, targetAnchor?: AnchorConfig) => boolean;
|
|
@@ -58,6 +59,14 @@ export default class BaseNodeModel implements IBaseNodeModel {
|
|
|
58
59
|
hasSetSourceRules: boolean;
|
|
59
60
|
[propName: string]: any;
|
|
60
61
|
constructor(data: NodeConfig, graphModel: GraphModel);
|
|
62
|
+
get incoming(): {
|
|
63
|
+
nodes: BaseNodeModel[];
|
|
64
|
+
edges: BaseEdgeModel[];
|
|
65
|
+
};
|
|
66
|
+
get outgoing(): {
|
|
67
|
+
nodes: BaseNodeModel[];
|
|
68
|
+
edges: BaseEdgeModel[];
|
|
69
|
+
};
|
|
61
70
|
/**
|
|
62
71
|
* @overridable 可以重写
|
|
63
72
|
* 初始化节点数据
|
|
@@ -113,7 +122,7 @@ export default class BaseNodeModel implements IBaseNodeModel {
|
|
|
113
122
|
* 获取当前节点锚点样式
|
|
114
123
|
* @returns 自定义样式
|
|
115
124
|
*/
|
|
116
|
-
getAnchorStyle(): Record<string, any>;
|
|
125
|
+
getAnchorStyle(anchorInfo: any): Record<string, any>;
|
|
117
126
|
/**
|
|
118
127
|
* @overridable 支持重写
|
|
119
128
|
* 获取当前节点锚点拖出连线样式
|
|
@@ -26,7 +26,8 @@ export default class TextEdit extends Component<IProps, IState> {
|
|
|
26
26
|
style: any;
|
|
27
27
|
};
|
|
28
28
|
componentDidUpdate(): void;
|
|
29
|
-
keyupHandler: (ev:
|
|
29
|
+
keyupHandler: (ev: any) => void;
|
|
30
|
+
inputHandler: (ev: any) => void;
|
|
30
31
|
placeCaretAtEnd(el: any): void;
|
|
31
32
|
render(): h.JSX.Element;
|
|
32
33
|
}
|
package/types/view/Anchor.d.ts
CHANGED
|
@@ -4,9 +4,6 @@ import GraphModel from '../model/GraphModel';
|
|
|
4
4
|
import { AnchorConfig } from '../type';
|
|
5
5
|
declare type TargetNodeId = string;
|
|
6
6
|
interface IProps {
|
|
7
|
-
x: number;
|
|
8
|
-
y: number;
|
|
9
|
-
id?: string;
|
|
10
7
|
anchorData: AnchorConfig;
|
|
11
8
|
style?: Record<string, any>;
|
|
12
9
|
hoverStyle?: Record<string, any>;
|