---
title: "panBy"
description: "Pan without animation by a [offset] Offset in pixels and suspend until it's set."
type: "function"
---

<div class='type'>Function</div>


<a id='references'></a>
<div class='sourceset sourceset-common'>Common</div>


> **Deprecated** Maintained for binary compatibility

```kotlin
suspend fun TransformableState.panBy(offset: Offset) =
    panBy(offset = offset, centroid = Offset.Unspecified)
```


Pan without animation by a `offset` Offset in pixels and suspend until it's set.

#### Parameters

| | |
| --- | --- |
| offset | offset in pixels by which to pan |




<div class='sourceset sourceset-common'>Common</div>


```kotlin
suspend fun TransformableState.panBy(offset: Offset, centroid: Offset = Offset.Unspecified) =
    transform {
        transformByWithCentroid(
            centroid = centroid,
            zoomChange = 1f,
            panChange = offset,
            rotationChange = 0f,
        )
    }
```


Pan without animation by a `offset` Offset in pixels and suspend until it's set.

#### Parameters

| | |
| --- | --- |
| offset | offset in pixels by which to pan |
| centroid | the `Offset` around which the pan should occur, if any. The default value is `Offset.Unspecified`, which leaves the behavior up to the implementation of the `TransformableState`. |




