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

Adding epubcif as an optional paramater to the Rendition.resize() method #959

Merged
merged 1 commit into from
Aug 8, 2019
Merged

Adding epubcif as an optional paramater to the Rendition.resize() method #959

merged 1 commit into from
Aug 8, 2019

Conversation

scott-engemann
Copy link
Contributor

@scott-engemann scott-engemann commented Jul 11, 2019

Adding epubcfi to the resize() method enables the ability to render the Epub to a specific location. This will work with both EpubCfi start location and an EpubCfiRange. This parameter is optional.

For Example, if the epub-container needs to be resized for any reason (from X1 x Y1 to X2 x Y2), the displayed starting location will change due to the resized are. If the epub-container is resized again (from X2 x Y2 back to X1 x Y1) the starting location will be set to the book.location.start.cfi from size X2 x Y2 which will result in the Epub being rendered starting on the previous page. In the situation of the book being displayed at the end of a long chapter and this process is repeated multiple times, the book will eventually be rendered at the start of the chapter.

Example of Enhancement

Figure 1 - Prior to TOC menu opening (Note the starting text "extensive performances. ...")

image

Figure 2 - TOC menu opened (Note the new starting text "whaling voyage, formed...")

image

Figure 3 - TOC menu is closed (Note the starting text is back to the first location "extensive performances. ...")

image

@scott-engemann scott-engemann changed the title Adding epubcif as an optional paramater to the Rendition.resize() method Adding epubcif as an optional paramater to the Rendition.resize() method Jul 11, 2019
@scott-engemann
Copy link
Contributor Author

scott-engemann commented Jul 11, 2019

@fchasen - Is there any chance of this one making its way into the NPM package for usage?

@scott-engemann
Copy link
Contributor Author

@fchasen - bump

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