Book
Book =
object
Defined in: core/src/book.ts:35
Properties
Section titled “Properties”off:
Emitter<BookEvents>["off"]
Defined in: core/src/book.ts:45
on:
Emitter<BookEvents>["on"]
Defined in: core/src/book.ts:44
orientation
Section titled “orientation”
readonlyorientation:Orientation
Defined in: core/src/book.ts:39
readonlypage:number
Defined in: core/src/book.ts:37
First page of the open spread, zero-based.
pageCount
Section titled “pageCount”
readonlypageCount:number
Defined in: core/src/book.ts:38
readonlyrect:BookRect
Defined in: core/src/book.ts:42
In book space: container pixels for a left-bound book, mirrored or transposed for the others.
readonlystate:FlipState
Defined in: core/src/book.ts:40
Methods
Section titled “Methods”destroy()
Section titled “destroy()”destroy():
void
Defined in: core/src/book.ts:68
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:48
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:49
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:55
Turns the page on show straight onto the spread holding page. Further than the next spread,
it turns as a clump: a few blank sheets, one per spread passed up to five, fan out from under
it and close up again before it lands. Only the pages on show and the target are drawn.
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:66
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:62
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:58
Returns
Section titled “Returns”void
turnPrev()
Section titled “turnPrev()”turnPrev():
void
Defined in: core/src/book.ts:59
Returns
Section titled “Returns”void
turnTo()
Section titled “turnTo()”turnTo(
page):void
Defined in: core/src/book.ts:57
Instant turns.
Parameters
Section titled “Parameters”number
Returns
Section titled “Returns”void
update()
Section titled “update()”update():
void
Defined in: core/src/book.ts:64
Re-measure the container and redraw. Resizes are handled automatically; call this after other layout changes.
Returns
Section titled “Returns”void