添加block快,不需要连接线,直接吸附。

This commit is contained in:
艾竹
2023-05-21 22:06:59 +08:00
parent 2fd8321363
commit fde899cfa9
30 changed files with 680 additions and 338 deletions

View File

@@ -114,7 +114,7 @@ namespace AIStudio.Wpf.DiagramDesigner
foreach (var g in deleteDrawGeometries)
{
this.Root.Remove(g);
this.Root.Delete(g);
}
return empty;

View File

@@ -104,7 +104,7 @@ namespace AIStudio.Wpf.DiagramDesigner
foreach (var g in deleteDrawGeometries)
{
this.Root.Remove(g);
this.Root.Delete(g);
}
return empty;

View File

@@ -97,7 +97,7 @@ namespace AIStudio.Wpf.DiagramDesigner
if (e.PropertyName == nameof(IsEditing) && _previewTextDesign.IsEditing == false)
{
_previewTextDesign.PropertyChanged -= _previewTextDesign_PropertyChanged;
Root?.Remove(_previewTextDesign);
Root?.Delete(_previewTextDesign);
Text = _previewTextDesign?.Text;
if (!string.IsNullOrEmpty(Text))
@@ -118,7 +118,7 @@ namespace AIStudio.Wpf.DiagramDesigner
this.ItemHeight = _previewTextDesign.ItemHeight;
this.Left = _previewTextDesign.Left + 2 + Geometry.Bounds.Left;
this.Top = _previewTextDesign.Top + 2 + Geometry.Bounds.Top;
this.Root?.AddItemCommand.Execute(this);
this.Root?.AddCommand.Execute(this);
IsLoaded = true;
}
}