Commit e5d85ad2 authored by Fred Chasen's avatar Fred Chasen

Fix epub example

parent 6c74c723
...@@ -244,12 +244,20 @@ ...@@ -244,12 +244,20 @@
} }
}; };
resizer();
window.addEventListener("resize", resizer, false); chunker.on("rendering", () => {
resizer();
window.addEventListener("resize", resizer, false);
});
setTimeout(() => { let pg = false;
chunker.on("page", () => {
if (pg) {
return;
}
pg = true;
let page = document.querySelector(".pagedjs_page"); let page = document.querySelector(".pagedjs_page");
let height = (page.offsetHeight + 51) * scale; let height = (page.offsetHeight + 51) * scale;
var next = document.getElementById("next"); var next = document.getElementById("next");
...@@ -283,7 +291,7 @@ ...@@ -283,7 +291,7 @@
}; };
document.addEventListener("keyup", keyListener, false); document.addEventListener("keyup", keyListener, false);
}, 200); });
epub = undefined; epub = undefined;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment