@logicflow/core 1.2.6 → 1.2.8
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
|
@@ -188,7 +188,7 @@ export default class LogicFlow {
|
|
|
188
188
|
* @param nodeConfig 节点配置
|
|
189
189
|
* @param eventType 新增节点事件类型,默认EventType.NODE_ADD
|
|
190
190
|
*/
|
|
191
|
-
addNode(nodeConfig: NodeConfig, eventType?: EventType): _Model.BaseNodeModel;
|
|
191
|
+
addNode(nodeConfig: NodeConfig, eventType?: EventType, e?: MouseEvent): _Model.BaseNodeModel;
|
|
192
192
|
/**
|
|
193
193
|
* 删除节点
|
|
194
194
|
* @param {string} nodeId 节点Id
|
|
@@ -273,9 +273,9 @@ declare class GraphModel {
|
|
|
273
273
|
/**
|
|
274
274
|
* 添加节点
|
|
275
275
|
* @param nodeConfig 节点配置
|
|
276
|
-
* @param eventType 新增节点事件类型,默认EventType.NODE_ADD
|
|
276
|
+
* @param eventType 新增节点事件类型,默认EventType.NODE_ADD, 在Dnd拖拽时,会传入EventType.NODE_DND_ADD
|
|
277
277
|
*/
|
|
278
|
-
addNode(nodeConfig: NodeConfig, eventType?: EventType): any;
|
|
278
|
+
addNode(nodeConfig: NodeConfig, eventType?: EventType, event?: MouseEvent): any;
|
|
279
279
|
/**
|
|
280
280
|
* 克隆节点
|
|
281
281
|
* @param nodeId 节点Id
|
package/types/util/drag.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import EventEmitter from '../event/eventEmitter';
|
|
2
|
-
import
|
|
3
|
-
import BaseNodeModel from '../model/node/BaseNodeModel';
|
|
2
|
+
import { IBaseModel } from '../model';
|
|
4
3
|
declare function createDrag({ onDragStart, onDragging, onDragEnd, step, isStopPropagation, }: {
|
|
5
4
|
onDragStart?: (...args: any[]) => void;
|
|
6
5
|
onDragging?: (...args: any[]) => void;
|
|
@@ -22,7 +21,7 @@ declare class StepDrag {
|
|
|
22
21
|
sumDeltaY: number;
|
|
23
22
|
eventType: string;
|
|
24
23
|
eventCenter: EventEmitter | null;
|
|
25
|
-
model?:
|
|
24
|
+
model?: IBaseModel;
|
|
26
25
|
data?: object;
|
|
27
26
|
startTime?: number;
|
|
28
27
|
constructor({ onDragStart, onDragging, onDragEnd, eventType, eventCenter, step, isStopPropagation, model, data, }: {
|
|
@@ -24,12 +24,12 @@ export default class Dnd {
|
|
|
24
24
|
dragEnter: (e: any) => void;
|
|
25
25
|
onDragOver: (e: any) => boolean;
|
|
26
26
|
onDragLeave: () => void;
|
|
27
|
-
onDrop: (e:
|
|
27
|
+
onDrop: (e: MouseEvent) => void;
|
|
28
28
|
eventMap(): {
|
|
29
29
|
onMouseEnter: (e: any) => void;
|
|
30
30
|
onMouseOver: (e: any) => void;
|
|
31
31
|
onMouseMove: (e: any) => boolean;
|
|
32
32
|
onMouseLeave: () => void;
|
|
33
|
-
onMouseUp: (e:
|
|
33
|
+
onMouseUp: (e: MouseEvent) => void;
|
|
34
34
|
};
|
|
35
35
|
}
|