Exemple #1
0
        private void ElementCanStartDragHandler(BaseDraggableListElement element)
        {
            if (!m_canDragElements)
            {
                return;
            }

            var contentDistance = (m_contentStartPosition - m_content.anchoredPosition).magnitude;

            if (contentDistance < m_dragTolerance)
            {
                m_draggableElementIndex = element.transform.GetSiblingIndex();
                m_draggableElement      = element;
                element.transform.SetParent(m_viewport);
                CreateDraggableElementBlank(element);

                element.StartDrag();
                SetScrollActive(false);
            }
        }