run

abstract fun run(to: ViewportState, completionListener: CompletionListener): Cancelable

Run the ViewportTransition from current viewport to the target ViewportState.

The completion block contains a Bool that is true if the transition is cancelled and false if it ran to completion. Implementations must be sure to invoke the completion block with false if the returned Cancelable is invoked prior to completion. the completion block must be invoked on the main queue. Transitions must handle the possibility that the "to" state might fail to provide a target camera in a timely manner or might update the target camera multiple times during the transition (a "moving target").

Return

a handle that can be used to cancel the current ViewportTransition

Parameters

completionListener

The listener to observe the completion state.

to

The target ViewportState