});
},
moveZoom: function (e, force) {
- var x = e.pageX / this.fluidbook.resize.ww;
- var y = e.pageY / this.fluidbook.resize.hh;
+ try {
+ var x = e.pageX / this.fluidbook.resize.ww;
+ var y = e.pageY / this.fluidbook.resize.hh;
- this.fluidbook.zoom.setOriginPct(x, y, force)
+ this.fluidbook.zoom.setOriginPct(x, y, force);
+ }catch(err){
+
+ }
},
clickZoom: function (e, way) {
if (way == undefined) {
m.find('.content').perfectScrollbar('update');
}
+ $("#popinOverlay>div").each(function () {
+ $(this).css({
+ top: (hh - $(this).outerHeight()) / 2,
+ left: (ww - $(this).outerWidth()) / 2
+ });
+ });
+
if ($("#archivesview").length == 1) {
var w = this.fluidbook.datas.filesInfos.archives.width;
var ratio = $("#archivesview img").width() / w;
var $this = this;
- if (!this.isMobile) {
+ if (!isMobile(false)) {
$(window).resize(function () {
resize();
});
} else {
-
if ("onorientationchange" in window) {
window.addEventListener('orientationchange', function () {
resize();
-function isMobile() {
+function isMobile(returnTrueIfTouch) {
+ if(returnTrueIfTouch==undefined){
+ returnTrueIfTouch=true;
+ }
var ua = navigator.userAgent;
var devices = ['iphone', 'ipad', 'ipod', 'droid', 'blackberry', 'mobile', 'htc', 'samsung', 'nokia', 'archos', 'galaxy', 'motorola', 'pad', 'tab', 'slate', 'motorola', 'symbian', 'phone', 'nintendo', 'playstation', 'touch', 'webos', 'ericsson'];
var pattern;
- if (Modernizr.ftouch) {
+ if (Modernizr.ftouch && returnTrueIfTouch) {
return true;
}
var DEVICE_READY_BEFORE_JQUERY = false;
var JQUERY_READY = false;
document.addEventListener('deviceready', _onDeviceReady, false);
+
function _onDeviceReady() {
if (JQUERY_READY) {
onDeviceReady();
init = false;
}
fluidbook.resize.resize(init);
-
- var ww = $(window).width();
- var wh = $(window).height();
- $("#popinOverlay>div").each(function () {
- $(this).css({
- top: (wh - $(this).outerHeight()) / 2,
- left: (ww - $(this).outerWidth()) / 2
- });
- });
-
}
function goNextPage(e) {