Added CenterToStepThenPage format flag which smothly transitions the left margin of a table as the table width increases from the high-level step width to the page width.
This commit is contained in:
parent
330f36250d
commit
4f4513ffe5
Binary file not shown.
@ -508,6 +508,18 @@ namespace VEPROMS.CSLA.Library
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#region CenterToStepThenPage
|
||||
[Category("Layout")]
|
||||
[Description("CenterToStepThenPage")]
|
||||
private LazyLoad<bool> _CenterToStepThenPage;
|
||||
public bool CenterToStepThenPage
|
||||
{
|
||||
get
|
||||
{
|
||||
return LazyLoad(ref _CenterToStepThenPage, "@CenterToStepThenPage");
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
#endregion
|
||||
#region SectTop
|
||||
|
@ -4058,18 +4058,31 @@ namespace Volian.Print.Library
|
||||
XOffset = hls1.XOffset + hls1.Width - Width; // align with the right edge of hls text
|
||||
}
|
||||
}
|
||||
if (itemInfo.MyDocStyle.Layout.CenterToStepThenPage)
|
||||
{
|
||||
if (Width > hls1.Width)
|
||||
{
|
||||
float XOffsetPage = leftMargin + ((pageWidth - leftMargin) - Width) / 2;
|
||||
float fraction = (Width - hls1.Width) / ((pageWidth - leftMargin) - hls1.Width);
|
||||
float XOffsetNew = (1 - fraction) * XOffset + fraction * XOffsetPage;
|
||||
_MyLog.WarnFormat("***XOffsetAdjust-CenterToStepThenPage*** ItemID, XOffset, XOffsetPage, XOffsetNew ={0},{1},{2},{3}", itemInfo.ItemID, XOffset, XOffsetPage, XOffsetNew);
|
||||
XOffset = XOffsetNew;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// if the XOffset < High Level Step Text's XOffset , then align with the High Level Step Text
|
||||
if (XOffset < xLowerLimit && Width < (xUpperLimit - xLowerLimit))
|
||||
XOffset = xLowerLimit;
|
||||
|
||||
// if the XOffset < High Level Step Text's XOffset , then align with the High Level Step Text
|
||||
if (XOffset < xLowerLimit && Width < (xUpperLimit - xLowerLimit))
|
||||
XOffset = xLowerLimit;
|
||||
// if the right margin exceeds the right edge of the rightmost RNO, then adjust right edge to match.
|
||||
if (XOffset + Width > xUpperLimit)
|
||||
XOffset = xUpperLimit - Width;
|
||||
|
||||
// if the right margin exceeds the right edge of the rightmost RNO, then adjust right edge to match.
|
||||
if (XOffset + Width > xUpperLimit)
|
||||
XOffset = xUpperLimit - Width;
|
||||
|
||||
// because of the above, if it pushes beyond the left margin, use the left margin.
|
||||
if (XOffset < (float)itemInfo.MyDocStyle.Layout.LeftMargin)
|
||||
XOffset = XOffsetBox = (float)itemInfo.MyDocStyle.Layout.LeftMargin;
|
||||
// because of the above, if it pushes beyond the left margin, use the left margin.
|
||||
if (XOffset < (float)itemInfo.MyDocStyle.Layout.LeftMargin)
|
||||
XOffset = XOffsetBox = (float)itemInfo.MyDocStyle.Layout.LeftMargin;
|
||||
}
|
||||
}
|
||||
private float AdjustForBlankLines()
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user