UnityEditor.SpriteUtilityWindow.HandlePanning C# (CSharp) Method

HandlePanning() protected method

protected HandlePanning ( ) : void
return void
        protected void HandlePanning()
        {
            bool flag = (!Event.current.alt && (Event.current.button > 0)) || (Event.current.alt && (Event.current.button <= 0));
            if (flag && (GUIUtility.hotControl == 0))
            {
                EditorGUIUtility.AddCursorRect(this.m_TextureViewRect, MouseCursor.Pan);
                if (Event.current.type == EventType.MouseDrag)
                {
                    this.m_ScrollPosition -= Event.current.delta;
                    Event.current.Use();
                }
            }
            if ((((Event.current.type == EventType.MouseUp) || (Event.current.type == EventType.MouseDown)) && flag) || (((Event.current.type == EventType.KeyUp) || (Event.current.type == EventType.KeyDown)) && (Event.current.keyCode == KeyCode.LeftAlt)))
            {
                base.Repaint();
            }
        }