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