mirror of
https://gitee.com/akwkevin/aistudio.-wpf.-diagram
synced 2026-04-09 02:36:35 +08:00
支持多个node保存到工具栏,显示还有点问题。
This commit is contained in:
@@ -512,6 +512,44 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
this.RaisePropertyChanged(nameof(Angle), GetOldValue<double>(nameof(Angle)), Angle);
|
||||
}
|
||||
|
||||
public FullyCreatedConnectorInfo GetFullConnectorInfo(Guid connectorId, ConnectorOrientation connectorOrientation, double xRatio, double yRatio, bool isInnerPoint, bool isPortless)
|
||||
{
|
||||
if (isInnerPoint)
|
||||
{
|
||||
return this.Connectors.Where(p => p.XRatio == xRatio && p.YRatio == yRatio).FirstOrDefault();
|
||||
}
|
||||
else if (isPortless)
|
||||
{
|
||||
return this.PortlessConnector;
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (connectorOrientation)
|
||||
{
|
||||
case ConnectorOrientation.Left:
|
||||
return this.LeftConnector;
|
||||
case ConnectorOrientation.TopLeft:
|
||||
return this.TopLeftConnector;
|
||||
case ConnectorOrientation.Top:
|
||||
return this.TopConnector;
|
||||
case ConnectorOrientation.TopRight:
|
||||
return this.TopRightConnector;
|
||||
case ConnectorOrientation.Right:
|
||||
return this.RightConnector;
|
||||
case ConnectorOrientation.BottomRight:
|
||||
return this.BottomRightConnector;
|
||||
case ConnectorOrientation.Bottom:
|
||||
return this.BottomConnector;
|
||||
case ConnectorOrientation.BottomLeft:
|
||||
return this.BottomLeftConnector;
|
||||
|
||||
default:
|
||||
throw new InvalidOperationException(
|
||||
string.Format("Found invalid persisted Connector Orientation for Connector Id: {0}", connectorId));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public RectangleBase GetBounds(bool includePorts = false)
|
||||
{
|
||||
if (!includePorts)
|
||||
|
||||
Reference in New Issue
Block a user