mirror of
https://gitee.com/akwkevin/aistudio.-wpf.-diagram
synced 2026-05-01 21:41:28 +08:00
Portless序列化
This commit is contained in:
@@ -10,6 +10,10 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
var pt = port.Position;
|
||||
switch (port.Orientation)
|
||||
{
|
||||
case ConnectorOrientation.Left:
|
||||
return new PointBase(pt.X, pt.Y + port.ConnectorHeight / 2);
|
||||
case ConnectorOrientation.TopLeft:
|
||||
return new PointBase(pt.X, pt.Y);
|
||||
case ConnectorOrientation.Top:
|
||||
return new PointBase(pt.X + port.ConnectorWidth / 2, pt.Y);
|
||||
case ConnectorOrientation.TopRight:
|
||||
@@ -21,9 +25,7 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
case ConnectorOrientation.Bottom:
|
||||
return new PointBase(pt.X + port.ConnectorWidth / 2, pt.Y + port.ConnectorHeight);
|
||||
case ConnectorOrientation.BottomLeft:
|
||||
return new PointBase(pt.X, pt.Y + port.ConnectorHeight);
|
||||
case ConnectorOrientation.Left:
|
||||
return new PointBase(pt.X, pt.Y + port.ConnectorHeight / 2);
|
||||
return new PointBase(pt.X, pt.Y + port.ConnectorHeight);
|
||||
default:
|
||||
return pt;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user