Function

animatePanBy

Animate pan by offset Offset in pixels and suspend until its finished

Deprecated

Maintained for binary compatibility

Source set: Common

Added in 1.11.0-rc01

Deprecated in 1.11.0-rc01

suspend fun TransformableState.animatePanBy(
    offset: Offset,
    animationSpec: AnimationSpec<Offset> = SpringSpec(stiffness = Spring.StiffnessLow),
) = animatePanBy(offset = offset, animationSpec = animationSpec, centroid = Offset.Unspecified)

Animate pan by offset Offset in pixels and suspend until its finished

Parameters

offset offset to pan, in pixels
animationSpec AnimationSpec to be used for pan animation
Source set: Common

Added in 1.11.0-rc01

Deprecated in 1.11.0-rc01

suspend fun TransformableState.animatePanBy(
    offset: Offset,
    animationSpec: AnimationSpec<Offset> = SpringSpec(stiffness = Spring.StiffnessLow),
    centroid: Offset = Offset.Unspecified,
)

Animate pan by offset Offset in pixels and suspend until its finished

Parameters

offset offset to pan, in pixels
animationSpec AnimationSpec to be used for pan animation
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.