/// <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); } }
/// <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); }
/// <summary> /// The resize gesture is canceled. /// </summary> public void CancelReshape(IInputModeContext context, RectD originalBounds) { handler.CancelReshape(context, originalBounds); layoutHelper.CancelLayout(); }
public void CancelReshape(IInputModeContext context, RectD originalBounds) { shadowObject.Remove(); simulationRectangle = null; originalHandler.CancelReshape(context, this.originalBounds); }