获取连接点时,如果根据坐标位置找不到时,根据id再查找一次

This commit is contained in:
fan.yaying
2023-09-11 10:25:40 +08:00
parent b08e13b93e
commit a184dce650

View File

@@ -211,7 +211,7 @@ namespace AIStudio.Wpf.DiagramDesigner
}
}
private double _itemHeight = 65;
private double _itemHeight = 65;
[CanDo]
[Browsable(true)]
public double ItemHeight
@@ -228,7 +228,7 @@ namespace AIStudio.Wpf.DiagramDesigner
RaisePropertyChanged(nameof(PhysicalItemHeight));
}
}
}
}
[DisplayName("ItemWidth(mm)")]
[Browsable(true)]
@@ -444,7 +444,7 @@ namespace AIStudio.Wpf.DiagramDesigner
{
return new PointBase(Left, Top);
}
}
}
[CanDo]
public PointBase TopLeft
@@ -746,7 +746,12 @@ namespace AIStudio.Wpf.DiagramDesigner
{
if (isInnerPoint)
{
return this.Connectors.Where(p => p.XRatio == xRatio && p.YRatio == yRatio).FirstOrDefault();
var connector = Connectors.FirstOrDefault(p => p.XRatio == xRatio && p.YRatio == yRatio);
if (connector == null)
{
connector = Connectors.FirstOrDefault(p => p.Id == connectorId);
}
return connector;
}
else if (isPortless)
{