Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Flip

Class representing the flipping process

Hierarchy

  • Flip

Index

Constructors

constructor

Methods

flip

  • flip(globalPos: Point): void
  • Page turning with animation

    Parameters

    • globalPos: Point

      Touch Point Coordinates (relative window)

    Returns void

flipNext

  • Turn to the next page (with animation)

    Parameters

    • corner: FlipCorner

      Active page corner when turning

    Returns void

flipPrev

  • Turn to the prev page (with animation)

    Parameters

    • corner: FlipCorner

      Active page corner when turning

    Returns void

flipToPage

  • flipToPage(page: number, corner: FlipCorner): void
  • Turn to the specified page number (with animation)

    Parameters

    • page: number

      New page number

    • corner: FlipCorner

      Active page corner when turning

    Returns void

fold

  • fold(globalPos: Point): void
  • Called when the page folding (User drags page corner)

    Parameters

    • globalPos: Point

      Touch Point Coordinates (relative window)

    Returns void

getCalculation

getState

showCorner

  • showCorner(globalPos: Point): void
  • Fold the corners of the book when the mouse pointer is over them. Called when the mouse pointer is over the book without clicking

    Parameters

    Returns void

start

  • start(globalPos: Point): boolean
  • Start the flipping process. Find direction and corner of flipping. Creating an object for calculation.

    Parameters

    • globalPos: Point

      Touch Point Coordinates (relative window)

    Returns boolean

    True if flipping is possible, false otherwise

stopMove

  • stopMove(): void
  • Called when the user has stopped flipping

    Returns void

Generated using TypeDoc