Esempio n. 1
0
        /// <summary>
        /// Interface method to end drag operation and clamp the panel to the screen
        /// </summary>
        /// <param name="eventData"></param>
        public void OnEndDrag(PointerEventData eventData)
        {
            dragging = false;

            if (rect == null)
            {
                return;
            }

            if (mainWindowInterface == null)
            {
                return;
            }

            mainWindowInterface.ClampToScreen(rect);

            mainWindowInterface.Position = new Vector2(rect.anchoredPosition.x, rect.anchoredPosition.y);
        }