Applies the given transform to the RendererRuntime element.
Get the rectangle used by this RendererRuntime to display publication content relative to the runtime container element. The rect should be defined in owner document coordinate system, i.e. without any transforms applied.
Get the dimensions for a page container element
Note that if centerSpread is truthy, the renderer is allowed to express a wider dimension than a single page. It should however use the same height as when isCenterSpread is false.
Set to true to get the dimensions of a center spread
The page container dimensions.
Get the renderable page instance associated with the given element if any.
Get the root element for the renderer.
Get the axis on which the user needs to swipe to navigate to the previous or next page. Return null if swipe navigation is not supported.
Receives IPointerEngineEvent objects, while the user is performing a gesture that could result in a navigation. This allows the renderer to give immediate feedback to the user by "animating" the navigation gesture. This typically includes the event types "pointerdown", "pointermove", "pointerup" and "pointercancel"
The related IPointerEngineEvent
The total number of css pixels moved along the x-axis
The total number of css pixels moved along the y-axis
A desired RendererNavigationAction or null if no action is to be taken.
If the page content is allowed to use native pan/scroll along the x-axis
If the page content is allowed to use native pan/scroll along the y-axis
Performs the specified navigation action.
Returns a Promise that is resolved when the action has been processed and animated to completion. Rejected if the canPerformNavigation() returned false for the action. Rejected if the navigation is canceled because another action was performed before the navigation completed.
One of the navigation actions NEXT_CONTENT_RANGE, PREVIOUS_CONTENT_RANGE, NEXT_RENDERABLE_PAGE, PREVIOUS_RENDERABLE_PAGE or CURRENT
The renderer is responsible for setting the previous/visible/next ranges on the contentRangeChangeCallbacks once they have been calculated.
Used by scroll renderers for minimizing scroll. When attempting to synchronize with a SyncMediaPlayer, it describes the location that most closely matches the SyncMediaPosition. When performing next()/previous(), it describes last reported next/previous content range start position.
Used by scroll renderers for minimizing scroll when attempting to synchronize with a SyncMediaPlayer. It describes the full range of the active segment and should be scrolled into view (but always keeping the intendedContentLocation in view). Only set when navigating due to an SyncMediaPlayer.attemptReaderViewSynchronization()
Navigates to the given ContentLocation within the renderable page stream.
MUST Reject if the RendererRuntime is destroyed.
Any ongoing navigations started with wither navigate(), navigateTo() or navigateToStart() MUST be rejected with an ABORTED error when this method is called.
Returns a Promise that is resolved when the GOTO action has been performed and pending animations have completed successfully. Rejected if the canPerformNavigation() returned false for the action. Rejected if the navigation is canceled because another action was performed before the animation completed. Rejected if "contentLocation" is invalid.
Only used by scrolling renderers. Triggered when a document's height has changed (could be due to the initial render or scripts inside the document). Will only be triggered when rendering scripted documents.
Generated using TypeDoc
Used internally by the framework.
Used to render IRenderableDocumentPage(s) to the DOM (i.e. A Content Document or a Content Document fragment processed for rendering to the DOM).
Consumers should NOT interact with any IRendererRuntime method directly. Instead, use the ReaderView instance to handle navigations and query state.
IRenderableDocumentPageStream
When created, the RendererRuntime receives an
IRendererContext
object. The IRendererContext provides a linear traversable stream of IRenderableDocumentPage objects which should be rendered.The RendererRuntime MUST call the methods in the passed RendererContext at the appropriate times to report its state, see RendererContext for more information.
Navigation
A call to navigateTo(), navigateToStart() will cause the RendererRuntime to perform the corresponding RendererNavigationAction (if the action is possible).
A RendererRuntime may deny a RendererNavigationAction if it cannot be performed at the time. For example, a RendererRuntime may not be able to perform navigate(RendererNavigationAction.NEXT) if in the middle of a goTo(), or if at the last page.
A RendererRuntime may cancel any ongoing RendererNavigationAction if another RendererNavigationAction is performed before the first one completes. For example, while performing RendererNavigationAction.NEXT, the user taps a TOC link which performs a goTo() action. The ongoing navigation RendererNavigationAction.NEXT is canceled and the RendererRuntime should instead perform the goTo() action.