/// <summary>
        /// The node is upon to be dragged.
        /// </summary>
        public void InitializeDrag(IInputModeContext context)
        {
            reparentHandler = context.Lookup <IReparentNodeHandler>();
            var graphControl = context.CanvasControl as GraphControl;

            layoutHelper = new LayoutHelper(graphControl, node);
            layoutHelper.InitializeLayout();
            handler.InitializeDrag(context);
        }
Esempio n. 2
0
        /// <summary>
        /// The subtree is upon to be dragged.
        /// </summary>
        public void InitializeDrag(IInputModeContext context)
        {
            subtree      = new Subtree(context.GetGraph(), node);
            layoutHelper = new RelocateSubtreeLayoutHelper((GraphControl)context.CanvasControl, subtree);
            layoutHelper.InitializeLayout();

            compositeHandler = CreateCompositeHandler(subtree);
            compositeHandler.InitializeDrag(context);
        }
 /// <summary>
 /// Stores the initial location of the movement for reference, and calls the base method.
 /// </summary>
 public void InitializeDrag(IInputModeContext context)
 {
     handler.InitializeDrag(context);
     lastLocation = new PointD(handler.Location);
 }