@logicflow/core 1.1.0-alpha.2 → 1.1.0-alpha.3
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
package/types/LogicFlow.d.ts
CHANGED
|
@@ -147,6 +147,16 @@ export default class LogicFlow {
|
|
|
147
147
|
* @param id 元素id
|
|
148
148
|
*/
|
|
149
149
|
deleteElement(id: any): boolean;
|
|
150
|
+
/**
|
|
151
|
+
* 获取节点或边对象
|
|
152
|
+
* @param id id
|
|
153
|
+
*/
|
|
154
|
+
getModelById(id: string): _Model.BaseNodeModel | _Model.BaseEdgeModel;
|
|
155
|
+
/**
|
|
156
|
+
* 获取节点或边的数据
|
|
157
|
+
* @param id id
|
|
158
|
+
*/
|
|
159
|
+
getDataById(id: string): NodeConfig | EdgeConfig;
|
|
150
160
|
/**
|
|
151
161
|
* 修改指定节点类型
|
|
152
162
|
* @param id 节点id
|
|
@@ -74,7 +74,8 @@ export declare enum EventType {
|
|
|
74
74
|
CONNECTION_NOT_ALLOWED = "connection:not-allowed",
|
|
75
75
|
HISTORY_CHANGE = "history:change",
|
|
76
76
|
TEXT_UPDATE = "text:update",
|
|
77
|
-
GRAPH_TRANSFORM = "graph:transform"
|
|
77
|
+
GRAPH_TRANSFORM = "graph:transform",
|
|
78
|
+
GRAPH_RENDERED = "graph:rendered"
|
|
78
79
|
}
|
|
79
80
|
export declare enum SegmentDirection {
|
|
80
81
|
HORIZONTAL = "horizontal",
|
|
@@ -2,7 +2,6 @@ import BaseNodeModel from './node/BaseNodeModel';
|
|
|
2
2
|
import BaseEdgeModel from './edge/BaseEdgeModel';
|
|
3
3
|
import EditConfigModel from './EditConfigModel';
|
|
4
4
|
import TransfromModel from './TransformModel';
|
|
5
|
-
import { IBaseModel } from './BaseModel';
|
|
6
5
|
import { OverlapMode } from '../constant/constant';
|
|
7
6
|
import { AdditionData, Point, NodeConfig, EdgeConfig, PointTuple, NodeMoveRule, GraphConfigData } from '../type';
|
|
8
7
|
import EventEmitter from '../event/eventEmitter';
|
|
@@ -115,6 +114,9 @@ declare class GraphModel {
|
|
|
115
114
|
model: BaseEdgeModel;
|
|
116
115
|
};
|
|
117
116
|
};
|
|
117
|
+
get modelsMap(): {
|
|
118
|
+
[key: string]: BaseNodeModel | BaseEdgeModel;
|
|
119
|
+
};
|
|
118
120
|
/**
|
|
119
121
|
* 基于zIndex对元素进行排序。
|
|
120
122
|
* todo: 性能优化
|
|
@@ -183,7 +185,7 @@ declare class GraphModel {
|
|
|
183
185
|
/**
|
|
184
186
|
* 获取节点或者边的model
|
|
185
187
|
*/
|
|
186
|
-
getElement(id: string):
|
|
188
|
+
getElement(id: string): BaseNodeModel | BaseEdgeModel | undefined;
|
|
187
189
|
/**
|
|
188
190
|
* 所有节点上所有边的model
|
|
189
191
|
*/
|