---
title: "moveBy"
description: "Sends a move event on the associated node, with the position of the pointer with the given
[pointerId] moved by the given [delta].

If the pointer is not yet down, an [IllegalArgumentException] will be thrown."
type: "function"
---

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


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


> **Deprecated** Replaced by TouchInjectionScope. Use `performTouchInput` instead of `performGesture`

```kotlin
fun GestureScope.moveBy(pointerId: Int, delta: Offset) =
    delegateScope.touch { moveBy(pointerId, delta) }
```


Sends a move event on the associated node, with the position of the pointer with the given
`pointerId` moved by the given `delta`.

If the pointer is not yet down, an `IllegalArgumentException` will be thrown.

#### Parameters

| | |
| --- | --- |
| pointerId | The id of the pointer to move, as supplied in `down` |
| delta | The position for this move event, relative to the last sent position of the pointer. For example, `delta = Offset(10.px, -10.px) will add 10.px to the pointer's last x-position, and subtract 10.px from the pointer's last y-position. |




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


> **Deprecated** Replaced by TouchInjectionScope. Use `performTouchInput` instead of `performGesture`

```kotlin
fun GestureScope.moveBy(delta: Offset) = delegateScope.touch { moveBy(delta) }
```


Sends a move event on the associated node, with the position of the default pointer moved by the
given `delta`. The default pointer has `pointerId = 0`.

If the pointer is not yet down, an `IllegalArgumentException` will be thrown.

#### Parameters

| | |
| --- | --- |
| delta | The position for this move event, relative to the last sent position of the pointer. For example, `delta = Offset(10.px, -10.px) will add 10.px to the pointer's last x-position, and subtract 10.px from the pointer's last y-position. |




