diff options
author | Andrew Dolgov <[email protected]> | 2018-06-28 17:40:38 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2018-06-28 17:40:38 +0300 |
commit | 9ce0a699f093415b85bf013dddfccacedcd71fe1 (patch) | |
tree | 42fa015dec0a7e8d1c0451227d3889704e222f9c | |
parent | 80a289489d3c57efe6e33129841ae248f7409923 (diff) |
add workaround for current location being lost if container is resized
-rw-r--r-- | read.html | 20 |
1 files changed, 16 insertions, 4 deletions
@@ -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({ |