Пример #1
0
        public virtual void OnStartDragging(GraphElement ge)
        {
            var node = ge as CollapsiblePortNode;

            if (node != null)
            {
                ge.RemoveFromHierarchy();

                GraphView.AddElement(ge);
                // Reselect it because RemoveFromHierarchy unselected it
                ge.Select(GraphView, true);
            }
        }
        public void RemoveElement(GraphElement graphElement)
        {
            StackNode stack = graphElement.parent as StackNode;

            if (stack != null)
            {
                stack.RemoveElement(graphElement);
                if (elementsRemovedFromStackNode != null)
                {
                    elementsRemovedFromStackNode(stack, new[] { graphElement });
                }
            }

            graphElement.RemoveFromHierarchy();
        }