mirror of
https://gitee.com/akwkevin/aistudio.-wpf.-diagram
synced 2026-03-03 00:00:57 +08:00
系统优化
This commit is contained in:
@@ -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