-
Notifications
You must be signed in to change notification settings - Fork 101
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
Fix/viewport clipped #188
base: develop
Are you sure you want to change the base?
Fix/viewport clipped #188
Conversation
…orm *value* in transition *property*)
CSS prefixes, including special treatment for transitions on transforms
… or scroll views. Fixes readium/readium-js-viewer#232 (fixes Chrome extension/cloud reader, as well as native apps (although they do not expose "zoom" UI affordances yet)) (trivial tested fix, no need for feature branch + pull request)
Added info about where to find information about the licensing. Conflicts: README.md
Conflicts: README.md
Only the "Files changed" section is relevant here. |
I had a look at possible regression bugs by hunting down usages of |
I don't think that |
I was thinking of: _$epubHtml.css("width", (_htmlBodyIsVerticalWritingMode ? _lastViewPortSize.width : _paginationInfo.columnWidth) + "px");
_$epubHtml.css("column-width", _paginationInfo.columnWidth + "px"); |
We can add I just tested my solution on popular browsers and it works fine (Chrome, Firefox, Safari, IE10 & IE11). |
That's great @johanpoirier thank you very much for your time on this! :) |
I ran some tests on Android and iOS and it works fine. @danielweck, will this PR be merged? |
What is the status on this PR? |
@johanpoirier we're waiting to hear more about another CSS column-pagination bug (missing reflowable page), so we can see the "big picture". This PR just needs to be updated with |
|
||
_paginationInfo.pageOffset = (_paginationInfo.columnWidth + _paginationInfo.columnGap) * _paginationInfo.visibleColumnCount * _paginationInfo.currentSpreadIndex; |
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.
Although I like the idea of deferring the numerical rounding until the last minute (i.e. application of CSS rules), I am concerned that / curious about the fact that _paginationInfo.pageOffset
potentially contains many decimal places, and is used in the "CFI navigation logic" calculations:
https://github.com/readium/readium-shared-js/blob/develop/js/views/cfi_navigation_logic.js#L116
function getVisibleContentOffsets() {
if(isVerticalWritingMode()){
return {
top: (options.paginationInfo ? options.paginationInfo.pageOffset : 0)
};
}
return {
left: (options.paginationInfo ? options.paginationInfo.pageOffset : 0)
* (isPageProgressionRightToLeft() ? -1 : 1)
};
}
Competing solution? #288 |
Fixes #181 :
Reflowable document viewport gets clipped when enlarged (CSS columns) because the page offset is computed with rounded values.
To fix that, we do not round the column width value, but we round the page offset value instead. The page offset value is used to display the current content.