Exemple #1
0
        private void HandleDraggableDragMoved()
        {
            if (ChainView.Instance.Zooming)
            {
                return;
            }

            BoundsChanged();

            if (IsRecursiveDrag)
            {
                foreach (var nodeView in ChainView.GetDescendentNodeViews(this))
                {
                    nodeView.BoundsChanged();
                }
            }
        }
Exemple #2
0
        private void HandleDraggableDragEnded()
        {
            if (ChainView.Instance.Zooming || ChainView.Instance.Dragging)
            {
                return;
            }

            JustMoved = true;

            BoundsChanged();

            m_rect = new Rect(transform.position.x - 80, transform.position.y - knownLargestHeight - 80,
                              RectTransform.rect.width + 160,
                              knownLargestHeight + 160);

            if (IsRecursiveDrag)
            {
                foreach (var nodeView in ChainView.GetDescendentNodeViews(this))
                {
                    nodeView.BoundsChanged();
                }
            }
        }
Exemple #3
0
        private void HandleDraggableMouseDown()
        {
            if (ChainView.Instance.Zooming)
            {
                return;
            }

            IsRecursiveDrag = Input.GetKey(KeyCode.LeftShift) || Input.GetKey(KeyCode.RightShift);

            if (IsRecursiveDrag)
            {
                var nodeViewsToDrag = ChainView.GetDescendentNodeViews(this);

                nodeViewsToDrag.Add(this);

                Draggable.Targets = nodeViewsToDrag.Select(d => d.transform).ToList();
            }
            else
            {
                Draggable.Targets = new List <Transform> {
                    transform
                };
            }
        }