moveBy
Function
Common
Deprecated Replaced by TouchInjectionScope. Use
performTouchInput
instead ofperformGesture
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. |
Common
Deprecated Replaced by TouchInjectionScope. Use
performTouchInput
instead ofperformGesture
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. |