From 9ce0a699f093415b85bf013dddfccacedcd71fe1 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Thu, 28 Jun 2018 17:40:38 +0300 Subject: add workaround for current location being lost if container is resized --- read.html | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/read.html b/read.html index ddbd333..b19c23e 100644 --- a/read.html +++ b/read.html @@ -466,14 +466,26 @@ if (callback) callback(); } -/* EPUBJS.Renderer.prototype.onResized = function(e) { + EPUBJS.Renderer.prototype.onResized = function(e) { this.trigger('renderer:beforeResize'); - var width = $("#reader").width(); - var height = $("#reader").height(); + var width = this.container.clientWidth; + var height = this.container.clientHeight; this.resize(width, height, false); - }; */ + + $(".loading").show(); + $(".loading_message").html("Opening chapter..."); + + window.setTimeout(function() { + open_lastread(); + + window.setTimeout(function() { + $(".loading").hide(); + }, 500); + + }, 1000); + }; if (_is_ios) { var book = ePub({ -- cgit v1.2.3