'use strict'; /*@ Ox.CBRViewer CBR Viewer options Options center <[n]|s|'auto'> Center ([x, y] or 'auto') height Viewer height in px maxZoom Maximum zoom (minimum zoom is 'fit') cbrjsURL URL to cbr.js url CBR URL width Viewer width in px zoom Zoom (number or 'fit' or 'fill') self Shared private variable ([options[, self]]) -> CBR Viewer center Center changed center <[n]|s> Center zoom Zoom changed zoom Zoom page Page changed page Page @*/ Ox.CBRViewer = 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('cbr', {cbr: self.options.url}); }, width: updateSize, zoom: function() { setCenterAndZoom(); } }) .addClass('OxCBRViewer') .on({ }) .bindEvent({ }); self.$iframe = Ox.Element('