mirror of
https://gitee.com/langsisi_admin/serein-flow
synced 2026-03-13 04:59:24 +08:00
优化了Workbench画布节点创建相关的代码逻辑
This commit is contained in:
@@ -35,11 +35,6 @@ namespace Serein.Workbench.Services
|
||||
/// </summary>
|
||||
public Action<FlowCanvasView> OnRemoveFlowCanvasView { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 添加了节点
|
||||
/// </summary>
|
||||
public Action<NodeControlBase> OnCreateNode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 查看的画布发生改变
|
||||
/// </summary>
|
||||
@@ -356,7 +351,11 @@ namespace Serein.Workbench.Services
|
||||
nodeMVVM.ViewModelType, // 控件VIewModel类型
|
||||
nodeModel, // 控件数据实体
|
||||
nodeCanvas); // 所在画布
|
||||
OnCreateNode.Invoke(nodeControl); // 创建节点
|
||||
|
||||
if(nodeCanvas is IFlowCanvas flowCanvas)
|
||||
{
|
||||
flowCanvas.Add(nodeControl); // 创建节点
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user