library / com.otaliastudios.zoom / ZoomEngine / panTo

panTo

open fun panTo(x: Float, y: Float, animate: Boolean): Unit

Overrides ZoomApi.panTo

Pans the content until the top-left coordinates match the given x-y values. These are referred to the content size passed in setContentSize, so they do not depend on current zoom.

Parameters

x - the desired left coordinate

y - the desired top coordinate

animate - whether to animate the transition