mirror of
https://gitee.com/akwkevin/aistudio.-wpf.-diagram
synced 2026-03-17 15:06:36 +08:00
修改暂存一下
This commit is contained in:
@@ -3,13 +3,13 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows;
|
||||
using AIStudio.Wpf.DiagramDesigner.Geometry;
|
||||
using AIStudio.Wpf.DiagramDesigner.Geometrys;
|
||||
|
||||
namespace AIStudio.Wpf.DiagramDesigner
|
||||
{
|
||||
public class FullyCreatedConnectorInfo : ConnectorInfoBase
|
||||
{
|
||||
public override PointBase Position
|
||||
public override ConnectorPoint Location
|
||||
{
|
||||
get
|
||||
{
|
||||
@@ -152,6 +152,52 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
return menuOptions;
|
||||
}
|
||||
}
|
||||
|
||||
public double GetXRatioFromConnector()
|
||||
{
|
||||
if (IsInnerPoint)
|
||||
{
|
||||
return XRatio;
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (Orientation)
|
||||
{
|
||||
case ConnectorOrientation.Top:
|
||||
return 0.5;
|
||||
case ConnectorOrientation.Left:
|
||||
return 0;
|
||||
case ConnectorOrientation.Bottom:
|
||||
return 0.5;
|
||||
case ConnectorOrientation.Right:
|
||||
return 1;
|
||||
default: return XRatio;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public double GetYRatioFromConnector()
|
||||
{
|
||||
if (IsInnerPoint)
|
||||
{
|
||||
return YRatio;
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (Orientation)
|
||||
{
|
||||
case ConnectorOrientation.Top:
|
||||
return 0;
|
||||
case ConnectorOrientation.Left:
|
||||
return 0.5;
|
||||
case ConnectorOrientation.Bottom:
|
||||
return 1;
|
||||
case ConnectorOrientation.Right:
|
||||
return 0.5;
|
||||
default: return YRatio;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user