UnityEditor.GameView.EnforceZoomAreaConstraints C# (CSharp) Method

EnforceZoomAreaConstraints() private method

private EnforceZoomAreaConstraints ( ) : void
return void
        private void EnforceZoomAreaConstraints()
        {
            Rect shownArea = this.m_ZoomArea.shownArea;
            if (shownArea.width > this.targetInContent.width)
            {
                shownArea.x = -0.5f * shownArea.width;
            }
            else
            {
                shownArea.x = Mathf.Clamp(shownArea.x, this.targetInContent.xMin, this.targetInContent.xMax - shownArea.width);
            }
            if (shownArea.height > this.targetInContent.height)
            {
                shownArea.y = -0.5f * shownArea.height;
            }
            else
            {
                shownArea.y = Mathf.Clamp(shownArea.y, this.targetInContent.yMin, this.targetInContent.yMax - shownArea.height);
            }
            this.m_ZoomArea.shownArea = shownArea;
        }