Options
All
  • Public
  • Public/Protected
  • All
Menu

Represents a location within a ReaderPublication and methods to extract information related to that location. An UnresolvedContentLocation can be a position in the publication content, or a range across publication content.

In contrast to ContentLocation, an UnresolvedContentLocation does only know the ReaderDocument of the location, but not its position within the ReaderDocument content. Therefore, the following methods are asynchronous in UnresolvedContentLocation:

  • contains()
  • equals()
  • intersects()
  • isAfter()
  • isBefore()

If you only need to get the ReaderDocument for a Locator, ReaderPublication.fetchUnresolvedContentLocation() should be preferred as it is more performant than ReaderPublication.fetchContentLocation().

An UnresolvedContentLocation, can be converted into a ContentLocation by calling resolve().

Hierarchy

  • IUnresolvedContentLocation

Index

Methods

collapseToEnd

  • If this UnresolvedContentLocation represents a range, it creates a new UnresolvedContentLocation by collapsing to its end position. If this UnresolvedContentLocation does not represent a range, the instance itself is returned.

    Returns Promise<IUnresolvedContentLocation>

collapseToStart

  • If this UnresolvedContentLocation represents a range, it creates a new UnresolvedContentLocation by collapsing to its start position. If this UnresolvedContentLocation does not represent a range, the instance itself is returned.

    Returns Promise<IUnresolvedContentLocation>

contains

createRangeTo

equals

fetchContentBlockTargets

  • Fetch the content blocks that corresponds to the UnresolvedContentLocation.

    Parameters

    • fetchMode: ContentBlockTargetFetchMode

      Determines whether it should include the ContentBlock before or after the location if the UnresolvedContentLocation start or end, targets content in between two ContentBlocks.

    Returns Promise<IContentBlockTarget[]>

fetchContentResolver

fetchNavigationItemReferences

getLocator

  • Get the ResourceTarget used to create this instance

    Returns Locator

getReaderDocuments

getReaderPublication

intersects

isAfter

isBefore

isRange

  • isRange(): Promise<boolean>
  • Returns true if this location represents a range.

    Returns Promise<boolean>

resolve

  • Further resolves the UnresolvedContentLocation into a ContentLocation allowing synchronous methods for several operations.

    Returns Promise<IContentLocation>

toJSON

  • Return a serializable version of the Locator that was used to create this instance. This is the same as calling getLocator().toJSON().

    Returns ISimpleLocatorData

Generated using TypeDoc