'use strict'; /*@ Ox.EpubViewer Epub Viewer options Options center <[n]|s|'auto'> Center ([x, y] or 'auto') height Viewer height in px maxZoom Maximum zoom (minimum zoom is 'fit') epubjsURL URL to epub.js url Epub URL width Viewer width in px zoom Zoom (number or 'fit' or 'fill') self Shared private variable ([options[, self]]) -> Epub Viewer center Center changed center <[n]|s> Center zoom Zoom changed zoom Zoom page Page changed page Page @*/ Ox.EpubViewer = function(options, self) { self = self || {}; var that = Ox.Element({}, self) .defaults({ center: 'auto', height: 384, page: 1, maxZoom: 16, url: '', width: 512, zoom: 'fit' }) .options(options || {}) .update({ center: function() { setCenterAndZoom(); }, page: updatePage, // allow for setting height and width at the same time height: updateSize, url: function() { self.$iframe.postMessage('epub', {epub: self.options.url}); }, width: updateSize, zoom: function() { setCenterAndZoom(); } }) .addClass('OxEpubViewer') .on({ }) .bindEvent({ }); self.$iframe = Ox.Element('