-
Notifications
You must be signed in to change notification settings - Fork 100
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
CFI related improvements #395
Merged
danielweck
merged 34 commits into
readium:develop
from
evidentpoint:feature/improved-cfi-logic
Jul 13, 2017
Merged
CFI related improvements #395
danielweck
merged 34 commits into
readium:develop
from
evidentpoint:feature/improved-cfi-logic
Jul 13, 2017
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
A good chunk of the clean up involves refactoring functions that deal with obtaining pagination offsets for better readability and consistency
…ulate spplit ratio
Note: Video elements (or other elements that are a "component") that is partially visible will be ignored. It's not a that big of an issue right now and a better solution needs to be found.
…sibleContentOffsets & frameDimensions
… text terminus step Fixes readium#294 Fixes readium#353
It is useful for getting a CFI that's as close as possible to an invisible (not rendered, zero client rects) element
… on page change requests
…here CFI was passed instead of $element findPageIndexDeltaByRectangles
Return null instead of an array with an empty object. This is to match the behaviour before the recent refactoring
…when appropriate Previously a CFI anchor was generated with a 1 character offset: First: `/4/2[introduction]/2,/1:0,/1:1` Last: `/4/2[introduction]/14,/1:223,/1:224` Now this anchor is still a single character but the start and end being the same start offset, hence a collapsed range or “caret” range First: `/4/2[introduction]/2/1:0` Last: `/4/2[introduction]/14/1:224`
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Improves general CFI functionality.
Fixes #384, #386. #353, #294
Introduces new Reader API calls:
getStartCfi
- Get CFI of the first element from the base of the documentgetEndCfi
- Get CFI of the last element from the base of the documentgetNearestCfiFromElement
- Useful for getting a CFI that's as close as possible to an invisible (not rendered, zero client rects) elementRan auto & manual tests to verify improvements with no regressions in the CFI area with focus on:
This PR also changes the way first/last visible CFI using text offsets are generated. Now they are based on a collapsed range when appropriate.
Example:
This pull request is Finalized
Related issue(s) and/or pull request(s)
Most likely fixes or improves the state of these issues:
#388
#384
#386
#345
#353
#294
#269
#230