系统优化

This commit is contained in:
akwkevin
2025-02-03 15:22:00 +08:00
parent ddf89e21e4
commit 141ba3b775
14 changed files with 871 additions and 66 deletions

View File

@@ -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)
{

View File

@@ -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));
}