Exemple #1
0
        void SelectSingleNode(AbstractView view, Event e)
        {
            // already selecting
            if (isSelecting)
            {
                return;
            }

            // clear node selection unless shift is pressed
            if (!e.shift)
            {
                curGraph.ClearNodeSelection();
            }

            // clicking on node?
            AbstractNode node = curGraph?.GetNode(e.mousePosition);

            if (node == null || node.Contains(e.mousePosition) != NodeEdge.Node)
            {
                return;
            }

            // select node
            node.isSelected = true;
        }