Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
pagedjs
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Thomas Parisot
pagedjs
Commits
31defffd
Commit
31defffd
authored
Nov 27, 2018
by
Fred Chasen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Prevent re-render for overflows during print rendering
parent
9fc20fcf
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
4 deletions
+11
-4
chunker.js
src/chunker/chunker.js
+11
-4
No files found.
src/chunker/chunker.js
View file @
31defffd
...
...
@@ -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
;
});
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment