-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for inserting pages #997
base: master
Are you sure you want to change the base?
Conversation
Thanks. We will need some tests. Also look at the review notes |
@@ -9,7 +9,7 @@ | |||
"document", | |||
"vector" | |||
], | |||
"version": "0.10.0", | |||
"version": "0.11.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do not update the version in package.json. It's done when a release is prepared
@@ -305,7 +305,7 @@ class LineWrapper extends EventEmitter { | |||
return false; | |||
} | |||
|
|||
this.document.addPage(); | |||
this.document.addPageAfterThis(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For safety this needs to be kept as addPage
return this; | ||
} | ||
|
||
addPageAfterThis(options) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For now i would not add this method. Can be added later with a clear use case
I've added a change that allows pages to be inserted through an
insertPage(at, options)
method.Also, when continuing pages, it will try to insert a page after the current one.
It will throw an error if option
bufferPages
is not set.