Commit 31defffd authored by Fred Chasen's avatar Fred Chasen

Prevent re-render for overflows during print rendering

parent 9fc20fcf
......@@ -348,6 +348,12 @@ class Chunker {
// Listen for page overflow
page.onOverflow((overflowToken) => {
// console.log("overflow on", page.id, overflowToken);
// Only reflow while rendering
if (this.rendered) {
return;
}
let index = this.pages.indexOf(page) + 1;
// Stop the rendering
......@@ -361,10 +367,11 @@ class Chunker {
this.q.enqueue(async () => {
if (this.rendered) {
this.start();
this.render(this.source, this.breakToken);
}
this.start();
await this.render(this.source, this.breakToken);
this.rendered = true;
});
});
......
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