diff --git a/Test.UI/Components/Pages/EditJWD.razor.cs b/Test.UI/Components/Pages/EditJWD.razor.cs index 11f04c5..4b25dcc 100644 --- a/Test.UI/Components/Pages/EditJWD.razor.cs +++ b/Test.UI/Components/Pages/EditJWD.razor.cs @@ -266,7 +266,7 @@ namespace Test.UI.Components.Pages {"Sash_Active_Overlap", 26}, {"Sash_Inactive_Overlap", 26}, {"Sash_BottomRail_Overlap", 24.5}, - {"Sash_Bottom_Overlap", 26}, + {"Sash_Bottom_Overlap", 18}, {"Sash_Horizontal_Bottom_Overlap", 26}, {"Sash_Horizontal_Top_Overlap", 41}, {"Sash_Threshold_Overlap", 18}, diff --git a/WebWindowComplex/Compo/CardFrame.razor.cs b/WebWindowComplex/Compo/CardFrame.razor.cs index c960dbd..6af9e61 100644 --- a/WebWindowComplex/Compo/CardFrame.razor.cs +++ b/WebWindowComplex/Compo/CardFrame.razor.cs @@ -115,6 +115,8 @@ namespace WebWindowComplex.Compo currFrame = CurrFrameWindow, svgNoHw = false }; + _ = EC_ReqResetDict.InvokeAsync(new DataUpdateRes { req = LayoutConst.DataAction.ResetDimElem }); + _ = EC_ReqElement.InvokeAsync(CurrFrameWindow); _ = EC_UpdateFrame.InvokeAsync(args); } } diff --git a/WebWindowComplex/Models/Area.cs b/WebWindowComplex/Models/Area.cs index 5086134..6db6e65 100644 --- a/WebWindowComplex/Models/Area.cs +++ b/WebWindowComplex/Models/Area.cs @@ -335,12 +335,16 @@ namespace WebWindowComplex.Models if (countAbsolute == sash.SashList.Count) { double sum = sash.SashList.Sum(x => x.dDimension); - if (sash.ParentArea is Frame) + if (sash.ParentArea is Frame || (sash.ParentArea.ParentArea is Split && split.SplitHorizList.Count > 0)) { - Frame? frame = sash.m_ParentWindow.AreaList.FirstOrDefault(); - if (frame != null) - dim = dim + frame.ElementDimensionList.ElementAt(1).dOverlap - + frame.ElementDimensionList.Last().dOverlap; + //Frame? frame = sash.m_ParentWindow.AreaList.FirstOrDefault(); + //if (frame != null) + // dim = dim + frame.ElementDimensionList.ElementAt(1).dOverlap + // + frame.ElementDimensionList.Last().dOverlap; + if(sash.SashList.Count == 1) + dim = dim + sash.SashList.First().ElementDimensionList.ElementAt(1).dOverlap; + for (int i = 1; i < sash.SashList.Count; i++) + dim = dim + sash.SashList.ElementAt(i).ElementDimensionList.Last().dOverlap; } else if (sash.ParentArea.ParentArea is Split && split.SplitVertList.Count > 0) { diff --git a/WebWindowComplex/Models/AreaDimension.cs b/WebWindowComplex/Models/AreaDimension.cs index 7a1e9e4..475f122 100644 --- a/WebWindowComplex/Models/AreaDimension.cs +++ b/WebWindowComplex/Models/AreaDimension.cs @@ -262,7 +262,7 @@ namespace WebWindowComplex.Models else indexSash = itemList.IndexOf(this); int indElem = indexSash == 0 ? 1 : s.SashList.ElementAt(indexSash).ElementDimensionList.Count - 1; - if (!s.bIsDimensionLight) + if (!s.bIsDimensionLight && s.SashList.ElementAt(indexSash).ElementDimensionList.Count > 0) overlapElem = s.SashList.ElementAt(indexSash).ElementDimensionList.ElementAt(indElem).dOverlap / 2; } return dDimension; diff --git a/WebWindowComplex/Models/Frame.cs b/WebWindowComplex/Models/Frame.cs index 4060095..a99b89f 100644 --- a/WebWindowComplex/Models/Frame.cs +++ b/WebWindowComplex/Models/Frame.cs @@ -85,7 +85,27 @@ namespace WebWindowComplex.Models } set { - m_SelThreshold = m_ThresholdList.Where(x => x.Type.Equals(value)).First(); + Threshold? newThreshold = m_ThresholdList.Where(x => x.Type.Equals(value)).FirstOrDefault(); + if (newThreshold != null) + m_SelThreshold = newThreshold; + else + m_SelThreshold = new Threshold(3, "Bottom"); + if (m_SelThreshold.Name.Equals("Threshold")) + { + ElementDimensionList.First().SetNameElement("Frame_Sash_Threshold"); + ElementDimensionList.First().SetMinDimension(Window.m_ParameterList.GetValueOrDefault(ElementDimensionList.First().sName + "_DimMin")); + ElementDimensionList.First().SetMaxDimension(Window.m_ParameterList.GetValueOrDefault(ElementDimensionList.First().sName + "_DimMax")); + ElementDimensionList.First().SetDimension(Window.m_ParameterList.GetValueOrDefault(ElementDimensionList.First().sName + "_DimStd")); + string overlapName = "Sash_Bottom_Overlap"; + ElementDimensionList.First().SetOverlapElement(Window.m_ParameterList.GetValueOrDefault(overlapName)); + } + if (AreaList.Count > 0) + { + SearchAreaList(this, AvailWidthArea(), "Width"); + SearchAreaList(this, AvailHeightArea(), "Height"); + } + + //ElementDimensionList.Clear(); } } @@ -694,7 +714,7 @@ namespace WebWindowComplex.Models } else { - m_SelThreshold = m_ThresholdList.FirstOrDefault() ?? new Threshold(1, "Bottom"); + m_SelThreshold = m_ThresholdList.FirstOrDefault() ?? new Threshold(3, "Bottom"); } } diff --git a/WebWindowComplex/Models/FrameDimension.cs b/WebWindowComplex/Models/FrameDimension.cs index 67a4a68..ced2f73 100644 --- a/WebWindowComplex/Models/FrameDimension.cs +++ b/WebWindowComplex/Models/FrameDimension.cs @@ -123,18 +123,10 @@ namespace WebWindowComplex.Models } } } - Frame? f = (Frame)Parent; - double dimAvail = 0; - if (ParentFrame.AreaList.Count > 0 && sName.Equals("Width") && f != null) - { - dimAvail = f.AvailWidthArea(); - ParentFrame.SearchAreaList(ParentFrame, dimAvail, "Width"); - } - else if(f != null) - { - dimAvail = f.AvailHeightArea(); - ParentFrame.SearchAreaList(ParentFrame, dimAvail, "Height"); - } + if (ParentFrame.AreaList.Count > 0 && sName.Equals("Width") && ParentFrame != null) + ParentFrame.SearchAreaList(ParentFrame, ParentFrame.AvailWidthArea(), "Width"); + else if(ParentFrame != null) + ParentFrame.SearchAreaList(ParentFrame, ParentFrame.AvailHeightArea(), "Height"); } } } diff --git a/WebWindowComplex/Models/Split.cs b/WebWindowComplex/Models/Split.cs index f2eb769..0344b15 100644 --- a/WebWindowComplex/Models/Split.cs +++ b/WebWindowComplex/Models/Split.cs @@ -408,7 +408,7 @@ namespace WebWindowComplex.Models AreaList[SplitIndex].AreaList.Add(newFill); } } - //UpdateSubAreaSplit(); + UpdateSubAreaSplit(); } } diff --git a/WebWindowComplex/TableComp.razor.cs b/WebWindowComplex/TableComp.razor.cs index bc63dd7..2f4c36d 100644 --- a/WebWindowComplex/TableComp.razor.cs +++ b/WebWindowComplex/TableComp.razor.cs @@ -1270,33 +1270,9 @@ namespace WebWindowComplex SpElemList.ElementAt(i).SetDimension(SpElemList.ElementAt(i).dMaxDim); else if (SpElemList.ElementAt(i).dDimension < SpElemList.ElementAt(i).dMinDim) SpElemList.ElementAt(i).SetDimension(SpElemList.ElementAt(i).dMinDim); - //string overlapName = ""; - //if (split.AreaList.ElementAt(i).AreaList.First() is Sash && - // split.AreaList.ElementAt(i + 1).AreaList.First() is Sash || - // (split.AreaList.ElementAt(i).AreaList.First() is Fill && - // split.AreaList.ElementAt(i + 1).AreaList.First() is Fill)) - //{ - // overlapName = string.Join("_", SpElemList.ElementAt(i).sName.Split('_').Skip(1)) + "_Overlap"; - //} - //else - //{ - // if (split.ElemDimVertList.Contains(SpElemList.ElementAt(i))) - // { - // overlapName = string.Join("_", SpElemList.ElementAt(i).sName.Split('_').Skip(1)) + "_Top_Overlap"; - // } - // else if (split.ElemDimHorizList.Contains(SpElemList.ElementAt(i))) - // { - // if (split.AreaList.ElementAt(i).AreaList.First() is Sash) - // overlapName = string.Join("_", SpElemList.ElementAt(i).sName.Split('_').Skip(1)) + "_Bottom_Overlap"; - // else - // overlapName = string.Join("_", SpElemList.ElementAt(i).sName.Split('_').Skip(1)) + "_Top_Overlap"; - // } - //} - //SpElemList.ElementAt(i).SetOverlapElement(Window.m_ParameterList.GetValueOrDefault(overlapName)); string overlapName = string.Join("_", SpElemList.ElementAt(i).sName.Split('_').Skip(1)); SpElemList.ElementAt(i).SetOverlapElement(Window.m_ParameterList.GetValueOrDefault(overlapName + "_Overlap")); } - split.UpdateSubAreaSplit(); break; } } diff --git a/WebWindowComplex/WebWindowComplex.csproj b/WebWindowComplex/WebWindowComplex.csproj index 42a17e6..dfc36af 100644 --- a/WebWindowComplex/WebWindowComplex.csproj +++ b/WebWindowComplex/WebWindowComplex.csproj @@ -6,7 +6,7 @@ net8.0 enable enable - 3.1.2.2417 + 3.1.2.2514 Annamaria Sassi Egalware Componente gestione Configurazioni avanzate Window per LUX @@ -246,6 +246,14 @@ + + + + + + + + diff --git a/WebWindowConfigurator/WebWindowConfigurator.csproj b/WebWindowConfigurator/WebWindowConfigurator.csproj index 5fddfe7..5049759 100644 --- a/WebWindowConfigurator/WebWindowConfigurator.csproj +++ b/WebWindowConfigurator/WebWindowConfigurator.csproj @@ -6,7 +6,7 @@ net8.0 enable enable - 3.1.2.2417 + 3.1.2.2514 Annamaria Sassi Egalware Componente gestione JWD per LUX @@ -204,6 +204,10 @@ + + + +