Option: max: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
| (4 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
Sets the maximum zoom factor. <tt>max</tt> is the scaling factor to be used when zooming in. | |||
{| class="wikitable" | |||
|- | |||
! scope="row" | Type | |||
! scope="row" | Default value | |||
|- | |||
| Number or Function | |||
| You must specify this parameter | |||
|} | |||
==Example== | |||
* Using a Number | |||
<pre class="javascript"> | |||
// This will increase three times the size of the flipbook | |||
$("#zoom-viewport").zoom({ | |||
flipbook: $("#flipbook"), | |||
max: 3 | |||
}); | |||
</pre> | |||
* Using a Function | |||
<pre class="javascript"> | |||
// If we want to make the flipbook 3000 width when zoomed in. | |||
$("#zoom-viewport").zoom({ | |||
flipbook: $("#flipbook"), | |||
max: function() { | |||
return 3000/$('.magazine').width(); | |||
} | |||
}); | |||
</pre> | |||
<yambe:breadcrumb>Zoom Options</yambe:breadcrumb> | <yambe:breadcrumb>Zoom Options</yambe:breadcrumb> | ||
Latest revision as of 23:57, 8 July 2012
Sets the maximum zoom factor. max is the scaling factor to be used when zooming in.
| Type | Default value |
|---|---|
| Number or Function | You must specify this parameter |
Example
- Using a Number
// This will increase three times the size of the flipbook
$("#zoom-viewport").zoom({
flipbook: $("#flipbook"),
max: 3
});
- Using a Function
// If we want to make the flipbook 3000 width when zoomed in.
$("#zoom-viewport").zoom({
flipbook: $("#flipbook"),
max: function() {
return 3000/$('.magazine').width();
}
});
<yambe:breadcrumb>Zoom Options</yambe:breadcrumb>