JoinDownwardTo() public method

public JoinDownwardTo ( ScreenCanvas canvas ) : void
canvas ScreenCanvas
return void
        private void SnapScreenJoin(LayoutScreenCanvas screenCanvas)
        {
            FreezeLayout();

            screenCanvas.Screen.SeverAllJoins();

            foreach (LayoutScreenCanvas neighbor in _screens.Values)
            {
                if (neighbor == screenCanvas)
                {
                    continue;
                }

                var rightDistance = screenCanvas.RightDistanceTo(neighbor);
                var leftDistance  = neighbor.RightDistanceTo(screenCanvas);
                var downDistance  = screenCanvas.DownDistanceTo(neighbor);
                var upDistance    = neighbor.DownDistanceTo(screenCanvas);

                if (rightDistance < 10)
                {
                    screenCanvas.JoinRightwardTo(neighbor);
                }
                else if (leftDistance < 10)
                {
                    neighbor.JoinRightwardTo(screenCanvas);
                }

                if (downDistance < 10)
                {
                    screenCanvas.JoinDownwardTo(neighbor);
                }
                else if (upDistance < 10)
                {
                    neighbor.JoinDownwardTo(screenCanvas);
                }
            }

            UnfreezeLayout();
        }
        private void SnapScreenJoin(LayoutScreenCanvas screenCanvas)
        {
            FreezeLayout();

            screenCanvas.Screen.SeverAllJoins();

            foreach (LayoutScreenCanvas neighbor in _screens.Values)
            {
                if (neighbor == screenCanvas)
                {
                    continue;
                }

                var rightDistance = screenCanvas.RightDistanceTo(neighbor);
                var leftDistance = neighbor.RightDistanceTo(screenCanvas);
                var downDistance = screenCanvas.DownDistanceTo(neighbor);
                var upDistance = neighbor.DownDistanceTo(screenCanvas);

                if (rightDistance < 10)
                {
                    screenCanvas.JoinRightwardTo(neighbor);
                }
                else if (leftDistance < 10)
                {
                    neighbor.JoinRightwardTo(screenCanvas);
                }

                if (downDistance < 10)
                {
                    screenCanvas.JoinDownwardTo(neighbor);
                }
                else if (upDistance < 10)
                {
                    neighbor.JoinDownwardTo(screenCanvas);
                }
            }

            UnfreezeLayout();
        }