Page Object: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
| Line 40: | Line 40: | ||
== | ==Example of page 1== | ||
<pre class="javascript"> | <pre class="javascript"> | ||
{ | { | ||
| Line 53: | Line 53: | ||
} | } | ||
</pre> | </pre> | ||
==Changing the page to turn== | |||
<pre class="javascript"> | |||
$("#flipbook").turn("start", function(event, pageObject, corner) { | |||
if (pageObject.page==1) { | |||
pageObject.next = 4; | |||
} | |||
}); | |||
</pre> | |||
This example will skip the page 2 when turning the page from 1. | |||
<yambe:breadcrumb>API</yambe:breadcrumb> | <yambe:breadcrumb>API</yambe:breadcrumb> | ||
Revision as of 17:34, 10 July 2012
The Page Object is the object that stores a page in the flipbook.
| Key | Type | Description | Sample value |
|---|---|---|---|
| acceleration | Boolean | The acceleration mode for this page | true |
| cornerSize | Number | Width and height in pixels of the each corner | 100 |
| next | Number | When using the corners of this page, it will turn to the number of page specified here. | 2 |
| page | Number | The current page number | 1 |
| turn | jQuery Element | A reference to the current flipbook | $("#flipbook")
|
| z-index | Number | The z position of this page | 10 |
Example of page 1
{
acceleration: true
cornerSize: 100
duration: 600
gradients: true
next: 2
page: 1
turn: $("#flipbook")
z-index: 24
}
Changing the page to turn
$("#flipbook").turn("start", function(event, pageObject, corner) {
if (pageObject.page==1) {
pageObject.next = 4;
}
});
This example will skip the page 2 when turning the page from 1.
<yambe:breadcrumb>API</yambe:breadcrumb>