mirror of
https://gitee.com/akwkevin/aistudio.-wpf.-diagram
synced 2026-04-29 12:43:24 +08:00
block
This commit is contained in:
@@ -74,7 +74,7 @@ namespace AIStudio.Wpf.DiagramDesigner
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#region 属性
|
#region
|
||||||
|
|
||||||
public FullyCreatedConnectorInfo FirstConnector
|
public FullyCreatedConnectorInfo FirstConnector
|
||||||
{
|
{
|
||||||
@@ -369,6 +369,17 @@ namespace AIStudio.Wpf.DiagramDesigner
|
|||||||
}
|
}
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
|
if (Root?.DiagramOption?.LayoutOption?.BeyondBoundary > 0)
|
||||||
|
{
|
||||||
|
if (value + GetItemWidth() < Root.DiagramOption.LayoutOption.BeyondBoundary)
|
||||||
|
{
|
||||||
|
value = Root.DiagramOption.LayoutOption.BeyondBoundary - GetItemWidth();
|
||||||
|
}
|
||||||
|
else if (value > Root.DiagramOption.LayoutOption.PageSize.Width - Root.DiagramOption.LayoutOption.BeyondBoundary)
|
||||||
|
{
|
||||||
|
value = Root.DiagramOption.LayoutOption.PageSize.Width - Root.DiagramOption.LayoutOption.BeyondBoundary;
|
||||||
|
}
|
||||||
|
}
|
||||||
SetProperty(ref _left, value);
|
SetProperty(ref _left, value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -384,6 +395,17 @@ namespace AIStudio.Wpf.DiagramDesigner
|
|||||||
}
|
}
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
|
if (Root?.DiagramOption?.LayoutOption?.BeyondBoundary > 0)
|
||||||
|
{
|
||||||
|
if (value + GetItemHeight() < Root.DiagramOption.LayoutOption.BeyondBoundary)
|
||||||
|
{
|
||||||
|
value = Root.DiagramOption.LayoutOption.BeyondBoundary - GetItemHeight();
|
||||||
|
}
|
||||||
|
else if (value > Root.DiagramOption.LayoutOption.PageSize.Height - Root.DiagramOption.LayoutOption.BeyondBoundary)
|
||||||
|
{
|
||||||
|
value = Root.DiagramOption.LayoutOption.PageSize.Height - Root.DiagramOption.LayoutOption.BeyondBoundary;
|
||||||
|
}
|
||||||
|
}
|
||||||
SetProperty(ref _top, value);
|
SetProperty(ref _top, value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -112,7 +112,7 @@ namespace AIStudio.Wpf.DiagramDesigner
|
|||||||
case PageSizeType.ESheet: size = new Size(863.6, 1117.6); break;
|
case PageSizeType.ESheet: size = new Size(863.6, 1117.6); break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return new Size(ScreenHelper.MmToWidth(size.Width), ScreenHelper.MmToWidth(size.Height));
|
return new Size(size.Width, size.Height);
|
||||||
}
|
}
|
||||||
|
|
||||||
private PageSizeOrientation _pageSizeOrientation;
|
private PageSizeOrientation _pageSizeOrientation;
|
||||||
@@ -370,6 +370,11 @@ namespace AIStudio.Wpf.DiagramDesigner
|
|||||||
{
|
{
|
||||||
get; set;
|
get; set;
|
||||||
} = true;
|
} = true;
|
||||||
|
|
||||||
|
public double BeyondBoundary
|
||||||
|
{
|
||||||
|
get; set;
|
||||||
|
} = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
public class SnappingOption
|
public class SnappingOption
|
||||||
|
|||||||
@@ -142,6 +142,11 @@ namespace AIStudio.Wpf.DiagramDesigner
|
|||||||
AnimationViewModel = CopyHelper.Mapper(designerbase.AnimationItem);
|
AnimationViewModel = CopyHelper.Mapper(designerbase.AnimationItem);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public object Tag
|
||||||
|
{
|
||||||
|
get; set;
|
||||||
|
}
|
||||||
|
|
||||||
public bool IsLoaded
|
public bool IsLoaded
|
||||||
{
|
{
|
||||||
get; set;
|
get; set;
|
||||||
|
|||||||
Reference in New Issue
Block a user