private bool HandleMouseUp(GraphCommand command)
        {
            MouseButton  button    = ((MouseButton)command.GetArgument(0));
            uint         compId    = ((uint)command.GetArgument(1));
            NodePart     nodePart  = ((NodePart)command.GetArgument(2));
            int          slotIndex = ((int)command.GetArgument(3));
            ModifierKeys modifiers = ((ModifierKeys)command.GetArgument(4));

            if (currentDragState == DragState.None)
            {
                IVisualNode node    = null;
                VisualNode  visNode = null;
                nodeCollection.TryGetValue(compId, out node);
                if (null != node)
                {
                    visNode = node as VisualNode;
                }

                switch (nodePart)
                {
                case NodePart.InputSlot:
                case NodePart.OutputSlot:
                case NodePart.NorthWest:
                case NodePart.South:
                case NodePart.Caption:
                case NodePart.Text:
                case NodePart.North:
                case NodePart.ReplicationGuide:
                case NodePart.InputLabel:
                    break;

                case NodePart.NorthEast:
                    visNode.ToggleContextualMenu(nodePart);
                    break;

                case NodePart.Preview:
                    //visNode.TogglePreview();
                    break;

                case NodePart.PreviewNorthEast:
                    //visNode.ToggleContextualMenu(nodePart);
                    break;

                default:
                    if (!modifiers.HasFlag(ModifierKeys.Control) && !modifiers.HasFlag(ModifierKeys.Shift))
                    {
                        ClearSelectionInternal();
                    }
                    break;
                }

                if (visualHost != null && visNode != null && visNode.Selected)
                {
                    visualHost.ScrollToVisual(visualHost.GetDrawingVisualForNode(visNode.NodeId));
                }
            }
            else if (currentDragState != DragState.CurveDrawing && currentDragState != DragState.EdgeReconnection) // for click and drag
            {
                currentDragState = DragState.None;                                                                 // it won't end when mouseup on the same slot
            }
            // IDE-1371
            selectionBox.UpdateSelectionBox(GetSelectedNodes());
            return(true);
        }