diff --git a/WebWindowComplex/Models/Area.cs b/WebWindowComplex/Models/Area.cs index 46ea61b..3f5a7e9 100644 --- a/WebWindowComplex/Models/Area.cs +++ b/WebWindowComplex/Models/Area.cs @@ -290,18 +290,6 @@ namespace WebWindowComplex.Models } else { - //Frame? f = node.ParentWindow.AreaList.First(); - //double dimAvail = 0; - //if (nameDim.Equals("Width")) - // dimAvail = dim - f.ElementDimensionList.ElementAt(1).dDimension - // - f.ElementDimensionList.Last().dDimension - // + f.ElementDimensionList.ElementAt(1).dOverlap - // + f.ElementDimensionList.Last().dOverlap; - //else - // dimAvail = dim - f.ElementDimensionList.First().dDimension - // - f.ElementDimensionList.ElementAt(f.ElementDimensionList.Count - 2).dDimension - // + f.ElementDimensionList.First().dOverlap - // + f.ElementDimensionList.ElementAt(f.ElementDimensionList.Count - 2).dOverlap; SearchAreaList(node.AreaList.ElementAt(i), dim, nameDim); } } diff --git a/WebWindowComplex/Models/ElementDimension.cs b/WebWindowComplex/Models/ElementDimension.cs index 2047e21..da61cfa 100644 --- a/WebWindowComplex/Models/ElementDimension.cs +++ b/WebWindowComplex/Models/ElementDimension.cs @@ -60,6 +60,36 @@ namespace WebWindowComplex.Models elemList.ElementAt(m_nIndex).SetDimension(elemList.ElementAt(m_nIndex).dDimension + diff); } } + else if(m_ParentArea is Sash && (m_nIndex == 2 || m_nIndex == 4)) + { + if (value > m_dMax) + value = m_dMax; + else if (value < m_dMin) + value = m_dMin; + Sash s = (Sash)m_ParentArea; + if (s.bIsDimensionLight) + { + int indSash = -1; + for(int i = 0; i < s.SashList.Count; i++) + { + if (s.SashList.ElementAt(i).ElementDimensionList.Contains(this)) + { + indSash = i; + break; + } + } + if (value > m_dDimension) + { + double diff = (value - m_dDimension); + s.SashList.ElementAt(indSash).SetDimension(s.SashList.ElementAt(indSash).dDimension - diff); + } + else + { + double diff = m_dDimension - value; + s.SashList.ElementAt(indSash).SetDimension(s.SashList.ElementAt(indSash).dDimension + diff); + } + } + } if (value > m_dMax) m_dDimension = m_dMax; else if (value < m_dMin) diff --git a/WebWindowConfigurator/WebWindowConfigurator.csproj b/WebWindowConfigurator/WebWindowConfigurator.csproj index 6b35485..4a251c7 100644 --- a/WebWindowConfigurator/WebWindowConfigurator.csproj +++ b/WebWindowConfigurator/WebWindowConfigurator.csproj @@ -152,6 +152,8 @@ + +