// Move the object to correct position after drop private void PostDropUpdateViewState(WorkflowViewElement view, ModelItem flownodeMI, AutoConnectDirections autoConnectDirection, Connector connectorToSplit, Point newPoint, Point anchorPoint, bool keepRelativePosition, ShapeOffsetter shapeOffsetter) { Fx.Assert((view != null && flownodeMI != null), "movedItem != null && flownodeMI != null"); Point shapeLocationPtr; if (autoConnectDirection != AutoConnectDirections.None) { shapeLocationPtr = this.CalculateDropLocationForAutoConnect(autoConnectDirection, view.DesiredSize); } else { shapeLocationPtr = SnapVisualToGrid(view, newPoint, anchorPoint, keepRelativePosition); if (!keepRelativePosition) { // To avoid overlaps shapeLocationPtr = shapeOffsetter.OffsetShapeLocation(shapeLocationPtr); } } if (connectorToSplit != null) { shapeLocationPtr = this.CalculateDropLocationForAutoSplit(newPoint, shapeLocationPtr, connectorToSplit, view.DesiredSize); } // if (keepRelativePosition) { this.OffsetDroppedItemToNewPosition(flownodeMI, shapeLocationPtr); } else { this.StoreShapeViewState(flownodeMI, shapeLocationPtr); } }