Book
Book =
object
Defined in: core/src/book.ts:28
Properties
Section titled “Properties”off:
Emitter<BookEvents>["off"]
Defined in: core/src/book.ts:37
on:
Emitter<BookEvents>["on"]
Defined in: core/src/book.ts:36
orientation
Section titled “orientation”
readonlyorientation:Orientation
Defined in: core/src/book.ts:32
readonlypage:number
Defined in: core/src/book.ts:30
First page of the open spread, zero-based.
pageCount
Section titled “pageCount”
readonlypageCount:number
Defined in: core/src/book.ts:31
readonlyrect:BookRect
Defined in: core/src/book.ts:34
readonlystate:FlipState
Defined in: core/src/book.ts:33
Methods
Section titled “Methods”destroy()
Section titled “destroy()”destroy():
void
Defined in: core/src/book.ts:55
Stop everything, drop listeners and observers, and restore the DOM.
Returns
Section titled “Returns”void
flipNext()
Section titled “flipNext()”flipNext(
corner?):Promise<boolean>
Defined in: core/src/book.ts:40
Animated turns. Resolve with false when there is nothing to turn to.
Parameters
Section titled “Parameters”corner?
Section titled “corner?”Returns
Section titled “Returns”Promise<boolean>
flipPrev()
Section titled “flipPrev()”flipPrev(
corner?):Promise<boolean>
Defined in: core/src/book.ts:41
Parameters
Section titled “Parameters”corner?
Section titled “corner?”Returns
Section titled “Returns”Promise<boolean>
flipTo()
Section titled “flipTo()”flipTo(
page,corner?):Promise<boolean>
Defined in: core/src/book.ts:42
Parameters
Section titled “Parameters”number
corner?
Section titled “corner?”Returns
Section titled “Returns”Promise<boolean>
redraw()
Section titled “redraw()”redraw():
void
Defined in: core/src/book.ts:53
Redraw the current frame without measuring, after something else rewrote page attributes. Cheap.
Returns
Section titled “Returns”void
setPages()
Section titled “setPages()”setPages(
pages):void
Defined in: core/src/book.ts:49
Replace the page elements. Keeps the current page where possible.
Parameters
Section titled “Parameters”Iterable<HTMLElement>
Returns
Section titled “Returns”void
turnNext()
Section titled “turnNext()”turnNext():
void
Defined in: core/src/book.ts:45
Returns
Section titled “Returns”void
turnPrev()
Section titled “turnPrev()”turnPrev():
void
Defined in: core/src/book.ts:46
Returns
Section titled “Returns”void
turnTo()
Section titled “turnTo()”turnTo(
page):void
Defined in: core/src/book.ts:44
Instant turns.
Parameters
Section titled “Parameters”number
Returns
Section titled “Returns”void
update()
Section titled “update()”update():
void
Defined in: core/src/book.ts:51
Re-measure the container and redraw. Resizes are handled automatically; call this after other layout changes.
Returns
Section titled “Returns”void