Skip to content
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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

joostlubach
Copy link

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.

@blikblum
Copy link
Member

blikblum commented Jul 9, 2019

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",
Copy link
Member

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();
Copy link
Member

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) {
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants