@likecoin/epub-ts
    Preparing search index...

    Class Rendition

    Implements

    Index

    Constructors

    Properties

    _layout: Layout | undefined
    annotations: Annotations
    book: Book
    displaying: defer<Section | undefined> | undefined
    emit: <K extends string>(type: K, ...args: RenditionEvents[K]) => void
    epubcfi: EpubCFI
    hooks: RenditionHooks
    location: Location | undefined
    manager: DefaultViewManager
    off: <K extends string>(
        type: K,
        fn?: (...args: RenditionEvents[K]) => void,
    ) => void
    on: <K extends string>(
        type: K,
        fn: (...args: RenditionEvents[K]) => void,
    ) => void
    q: Queue
    started: Promise<void>
    starting: defer<void>
    themes: Themes

    Methods

    • Call to attach the container to an element in the dom Container must be attached before rendering can begin

      Parameters

      • element: string | HTMLElement

        to attach to

      Returns Promise<void>

    • Remove and Clean Up the Rendition

      Returns void

    • Adjust the direction of the rendition

      Parameters

      • Optionaldir: string

      Returns void

    • Display a point in the book The request will be added to the rendering Queue, so it will wait until book is opened, rendering started and all other rendering tasks have finished to be called.

      Parameters

      • Optionaltarget: string | number

        Url or EpubCFI

      Returns Promise<Section>

    • Adjust the flow of the rendition to paginated or scrolled (scrolled-continuous vs scrolled-doc are handled by different view managers)

      Parameters

      • flow: string

      Returns void

    • Get a Range from a Visible CFI

      Parameters

      • cfi: string

        EpubCfi String

      • OptionalignoreClass: string

      Returns Range | undefined

    • Move the Rendition to a specific offset Usually you would be better off calling display()

      Parameters

      • offset: { left: number; top: number }

      Returns void

    • Go to the next "page" in the rendition

      Returns Promise<void>

    • Go to the previous "page" in the rendition

      Returns Promise<void>

    • Report the current location. Emits "relocated" and "locationChanged" events.

      Returns Promise<void>

    • Trigger a resize of the views

      Parameters

      • Optionalwidth: number
      • Optionalheight: number
      • Optionalepubcfi: string

        (optional)

      Returns void

    • Set the manager function

      Parameters

      • manager: DefaultViewManager

      Returns void

    • Adjust if the rendition uses spreads

      Parameters

      • spread: string

        none | auto (TODO: implement landscape, portrait, both)

      • Optionalmin: number

        min width to use spreads at

      Returns void

    • Start the rendering

      Returns void

      rendering has started

    • Get the views member from the manager

      Returns IframeView[] | Views