# CalculatePosition(float, float, float, float)

> Calculate new position of the dragged element.

## Definition

* **Type:** Method
* **Namespace:** [UnityEditor.Experimental.GraphView](/engine/6000.7/script-reference/unityeditor/experimental/graphview.md)
* **Assembly:** UnityEditor

```csharp
protected Rect CalculatePosition(float x, float y, float width, float height)
```

### Parameters

**** (\[float]\(https\://learn.microsoft.com/dotnet/api/system.single)): New x position.**** (\[float]\(https\://learn.microsoft.com/dotnet/api/system.single)): New y position.**** (\[float]\(https\://learn.microsoft.com/dotnet/api/system.single)): Element width.**** (\[float]\(https\://learn.microsoft.com/dotnet/api/system.single)): Element height.

### Returns

| Type                                                        | Description                        |
| ----------------------------------------------------------- | ---------------------------------- |
| [Rect](/engine/6000.7/script-reference/unityengine/rect.md) | Calculated and validated position. |
