Zooms and fits the document. This module will allow the user to zoom in and out, set a specific scale factor, or set a page fit mode that will be maintained when the browser window is resized.
(require("zoom-fit"))(viewer, options)
Creates the zoom and fit module.
Parameters:
Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
viewer |
Core |
The core viewer to which the module will attach. |
||||||
options |
Object |
An options object. Properties
|
Example
var ZoomFit = require('zoom-fit.js');
// a generic Viewer constructor
function Viewer(opts) {
var myZoomFit = ZoomFit(this, {
elem: document.getElementById('myZoomFit')
});
}
Methods
destroy()
Destroys the module.