mirror of
https://gitee.com/akwkevin/aistudio.-wpf.-diagram
synced 2026-03-03 00:00:57 +08:00
block
This commit is contained in:
@@ -724,8 +724,10 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
else
|
||||
{
|
||||
itemBase = Activator.CreateInstance(dragObject.ContentType) as DesignerItemViewModelBase;
|
||||
itemBase.Text = dragObject.Text;
|
||||
itemBase.Icon = dragObject.Icon;
|
||||
if (!string.IsNullOrEmpty(dragObject.Text))
|
||||
itemBase.Text = dragObject.Text;
|
||||
if (!string.IsNullOrEmpty(dragObject.Icon))
|
||||
itemBase.Icon = dragObject.Icon;
|
||||
itemBase.ColorViewModel = CopyHelper.Mapper(dragObject.ColorViewModel);
|
||||
if (dragObject.DesiredSize != null)
|
||||
{
|
||||
|
||||
@@ -637,7 +637,8 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
if (!Connectors.Contains(connector))
|
||||
{
|
||||
Connectors.Add(connector);
|
||||
ConnectorMargin = 0 - connector.ConnectorWidth / 2;
|
||||
if (!double.IsNaN(connector.ConnectorWidth))
|
||||
ConnectorMargin = 0 - connector.ConnectorWidth / 2;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user