Adding epubcif as an optional paramater to the Rendition.resize() method #959
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adding
epubcfi
to theresize()
method enables the ability to render the Epub to a specific location. This will work with bothEpubCfi
start location and anEpubCfiRange
. This parameter is optional.For Example, if the
epub-container
needs to be resized for any reason (fromX1 x Y1
toX2 x Y2
), the displayed starting location will change due to the resized are. If theepub-container
is resized again (fromX2 x Y2
back toX1 x Y1
) the starting location will be set to thebook.location.start.cfi
from sizeX2 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. ...")
Figure 2 - TOC menu opened (Note the new starting text "whaling voyage, formed...")
Figure 3 - TOC menu is closed (Note the starting text is back to the first location "extensive performances. ...")