mirror of
https://gitee.com/akwkevin/aistudio.-wpf.-diagram
synced 2026-04-05 08:46:34 +08:00
系统优化
This commit is contained in:
@@ -11,6 +11,10 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
{
|
||||
public class FullyCreatedConnectorInfo : ConnectorInfoBase
|
||||
{
|
||||
public FullyCreatedConnectorInfo(ConnectorOrientation orientation, bool isInnerPoint = false, bool isPortless = false)
|
||||
: this(null, orientation, isInnerPoint, isPortless)
|
||||
{
|
||||
}
|
||||
public FullyCreatedConnectorInfo(DesignerItemViewModelBase dataItem, ConnectorOrientation orientation, bool isInnerPoint = false, bool isPortless = false)
|
||||
: this(null, dataItem, orientation, isInnerPoint, isPortless)
|
||||
{
|
||||
|
||||
@@ -249,8 +249,8 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
}
|
||||
else
|
||||
{
|
||||
ItemWidth = Geometry.Bounds.Width;// + ColorViewModel.LineWidth * 0.5;
|
||||
ItemHeight = Geometry.Bounds.Height;// + ColorViewModel.LineWidth * 0.5;
|
||||
ItemWidth = Geometry.Bounds.Width + ColorViewModel.LineWidth * 1 - 1;
|
||||
ItemHeight = Geometry.Bounds.Height + ColorViewModel.LineWidth * 1 - 1;
|
||||
Left = point.X;
|
||||
Top = point.Y;
|
||||
}
|
||||
@@ -270,8 +270,8 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
ScaleTransform scaleTransform = transformGroup.Children.OfType<ScaleTransform>().FirstOrDefault();
|
||||
transformGroup.Children.Remove(scaleTransform); ;
|
||||
|
||||
double radiox = ItemWidth / Geometry.Bounds.Width;
|
||||
double radioy = ItemHeight / Geometry.Bounds.Height;
|
||||
double radiox = (ItemWidth - ColorViewModel.LineWidth * 1 + 1) / Geometry.Bounds.Width;
|
||||
double radioy = (ItemHeight - ColorViewModel.LineWidth * 1 + 1) / Geometry.Bounds.Height;
|
||||
transformGroup.Children.Add(new ScaleTransform(radiox, radioy));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user