Options
All
  • Public
  • Public/Protected
  • All
Menu

A Renderer is responsible for the presentation of the ReaderPublication within a ReaderView. For example, the StackRenderer presents the publication as a series of pages stacked on top of each other like a deck of cards.

Each Renderer implementation has its own set of options to controls its behavior and its visual aspects.

Renderers are added to a ReaderView using ReaderView.addRenderer(). See ReaderView.addRenderer for more information.

Hierarchy

  • IRenderer

Implemented by

Index

Methods

createRuntime

destroyRuntime

getName

  • getName(): string
  • Get the name of the renderer.

    Returns string

getOptions

getSpreadMode

  • Get this renderer's spread mode.

    This will affect how IRenderableDocumentPage objects are delivered to the renderer. See RendererSpreadMode for more information.

    Returns RendererSpreadMode

getSupportedFlowModes

getVisiblePagesArea

  • getVisiblePagesArea(viewDimensions: IDimensions, preferredPageAspectRatio: number, allDocumentsFixedLayout: boolean): number
  • Get the total area (as css width * css height) this renderer can utilize for displaying pages with the given page aspect ratio, but without any chrome used by the renderer.

    Parameters

    • viewDimensions: IDimensions

      The dimensions of the ReaderView's renderTo() element.

    • preferredPageAspectRatio: number

      The preferred aspect ratio of a single page as (width / height).

    • allDocumentsFixedLayout: boolean

      set it to true if all ReaderDocuments are fixed layout.

    Returns number

setOptions

  • Overwrites previously set options using values from the passed object, preserving existing values if they aren't defined in the passed object.

    The new options won't be used for already rendered content until ReaderView.refresh() has been called.

    Parameters

    Returns void

Generated using TypeDoc