diff options
author | Andrew Dolgov <[email protected]> | 2019-03-14 10:29:36 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2019-03-14 10:29:36 +0300 |
commit | 09f3a8d4532a6cbda37f1b2c686a81df8cfa076a (patch) | |
tree | a772aa4ad9d717c2de3b01cb410c558cd0e1a410 | |
parent | 0f370a8bda8146493bfd3543b3a227bbcbb0d02e (diff) |
add fadein to columns
-rwxr-xr-x | reader.js | 19 |
1 files changed, 10 insertions, 9 deletions
@@ -396,14 +396,13 @@ $(document).ready(function () { $("#reader img").on("load", function(e) { const img = $(this); - const is_right = img.hasClass('right-page'); - if (!is_right) { - if (img.width() > img.height()) { - $(".right-page").hide(); - } else { - $(".right-page").show(); - } + img.fadeIn(); + + if (img.width() > img.height()) { + $(".right-page").hide(); + } else { + $(".right-page").fadeIn(); } window.setTimeout(() => { @@ -466,8 +465,10 @@ $(document).ready(function () { if ($(".right-page").is(":visible") && page > 1) page = page - 1; - if (page > 0) + if (page > 0) { + $("#reader img").hide(); model.currentPage(page - 1); + } }); @@ -480,6 +481,7 @@ $(document).ready(function () { page = page + 1; if (page < model.totalPages()) { + $("#reader img").hide(); model.currentPage(page + 1); } }); @@ -514,7 +516,6 @@ $(document).ready(function () { localforage.getItem("LAST-OPENED-FILE").then((last) => { - const fs = remote.require('fs'); const argv = remote.process.argv; if (argv[1] && argv[1] != ".") { |