예제 #1
0
        /// <summary>
        /// Group the Models based on Height and Width
        /// </summary>
        /// <returns> the width and height of the last model </returns>
        private Tuple <Double, Double> CalculateWidthAndHeight()
        {
            var xgroup = SelectedModels.OrderBy(x => x.X).ToList();
            var ygroup = SelectedModels.OrderBy(x => x.Y).ToList();

            return(Tuple.Create(xgroup.Last().Width, ygroup.Last().Height));
        }
예제 #2
0
        /// <summary>
        /// Group the Models based on Height and Width
        /// </summary>
        /// <returns> the width and height of the last model </returns>
        private Tuple <Double, Double> CalculateWidthAndHeight()
        {
            var    xgroup  = SelectedModels.OrderBy(x => x.X).ToList();
            var    ygroup  = SelectedModels.OrderBy(x => x.Y).ToList();
            double yheight = ygroup.Last().Height;

            //If the last model is Node, then increase the height so that
            //node border does not overlap with the group
            if (ygroup.Last() is NodeModel)
            {
                yheight = yheight + ExtendYHeight;
            }

            return(Tuple.Create(xgroup.Last().Width, yheight));
        }