zoomToEventPosition

abstract fun zoomToEventPosition(event: MouseEngineEventData, scale: Double, animationOptions: TransformAnimationOptions? = TransformAnimationOptions(), onSuccess: () -> Unit = {}, onError: (ColibrioException) -> Unit = {})

Deprecated

Please use zoomToClientPosition(event.clientX, event.clientY, scale, ...) instead.

Applies a transform to the ReaderView using a MouseEngineEvent or PointerEngineEvent. The transform will scale and translate publication content so that the specified position is centered in the ReaderView.

This method has the same effect as zoomToClientPosition(event.clientX, event.clientY,...).

Parameters

event

A MouseEngineEventData or PointerEngineEventData used for calculating the center point of the zoom.

scale

The desired scale. Normal scale is 1 and bigger numbers means more zoomed in. Values lower than 1 will be capped to 1.

animationOptions

Specifies how the transform should be animated.


abstract suspend fun zoomToEventPosition(event: MouseEngineEventData, scale: Double, animationOptions: TransformAnimationOptions? = TransformAnimationOptions()): ColibrioResult<Unit>

Deprecated

Please use zoomToClientPosition(event.clientX, event.clientY, scale, ...) instead.

Applies a transform to the ReaderView using a MouseEngineEvent or PointerEngineEvent. The transform will scale and translate publication content so that the specified position is centered in the ReaderView.

This method has the same effect as zoomToClientPosition(event.clientX, event.clientY,...).

Return

Either ColibrioResult.Success when successful, or ColibrioResult.Error containing the error.

Parameters

event

A MouseEngineEventData or PointerEngineEventData used for calculating the center point of the zoom.

scale

The desired scale. Normal scale is 1 and bigger numbers means more zoomed in. Values lower than 1 will be capped to 1.

animationOptions

Specifies how the transform should be animated.