diff options
author | Andrew Dolgov <[email protected]> | 2018-02-20 20:28:10 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2018-02-20 20:28:10 +0300 |
commit | 642bede5b6446165cf1f169a4752537eb53c24d0 (patch) | |
tree | 3d2e9b772389d6cfcb6c6c05cf36f142a0e4f0a4 | |
parent | 9d24dc3ff0421fd9f768d453a9c74b2b48f4087a (diff) |
exp: enable transitions after a delay
-rw-r--r-- | read.html | 15 |
1 files changed, 11 insertions, 4 deletions
@@ -399,12 +399,19 @@ localforage.getItem("epube.disable-transitions").then(function(notransitions) { if (!notransitions) { - EPUBJS.core.addCss(baseUrl + "css/transitions.css", null, renderer.doc.head); - EPUBJS.Render.Iframe.prototype.setLeft = function(leftPos){ - this.docEl.style[this.transform] = 'translate('+ (-leftPos) + 'px, 0)'; - } + window.setTimeout(function() { + + EPUBJS.core.addCss(baseUrl + "css/transitions.css", null, renderer.doc.head); + + EPUBJS.Render.Iframe.prototype.setLeft = function(leftPos){ + this.docEl.style[this.transform] = 'translate('+ (-leftPos) + 'px, 0)'; + } + + }, 250); + } + }); if (callback) callback(); |