コード例 #1
0
        /// <summary>
        /// Restores the original node layout.
        /// </summary>
        public void CancelDrag(IInputModeContext inputModeContext, PointD originalLocation)
        {
            SetNodeLocationAndSize(inputModeContext, initialLayout.GetAnchorLocation(), initialLayout.GetSize());
            var portContext = new DelegatingContext(inputModeContext);

            foreach (var portHandle in portHandles)
            {
                portHandle.CancelDrag(portContext, originalLocation);
            }
            portHandles.Clear();
            if (reshapeHandler != null)
            {
                // if there is a reshape handler:
                // ensure proper handling of a parent group node
                reshapeHandler.CancelReshape(inputModeContext, initialRect);
            }
        }
コード例 #2
0
        /// <summary>
        /// Cancels the drag and cleans up.
        /// </summary>
        public void CancelDrag(IInputModeContext context, PointD originalLocation)
        {
            SetAngle(context, initialAngle);

            var portContext = new DelegatingContext(context);

            foreach (var portHandle in portHandles)
            {
                portHandle.CancelDrag(portContext, originalLocation);
            }
            portHandles.Clear();
            if (reshapeHandler != null)
            {
                reshapeHandler.CancelReshape(context, node.Layout.ToRectD());
            }
            if (compoundEdit != null)
            {
                compoundEdit.Cancel();
            }
            nodeAngles = null;
            ClearSameAngleHighlights(context);
        }
コード例 #3
0
 /// <summary>
 /// The resize gesture is canceled.
 /// </summary>
 public void CancelReshape(IInputModeContext context, RectD originalBounds)
 {
     handler.CancelReshape(context, originalBounds);
     layoutHelper.CancelLayout();
 }
コード例 #4
0
 public void CancelReshape(IInputModeContext context, RectD originalBounds)
 {
     shadowObject.Remove();
     simulationRectangle = null;
     originalHandler.CancelReshape(context, this.originalBounds);
 }