-
Notifications
You must be signed in to change notification settings - Fork 77
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
Impossible to open a file when linear="no" #124
Comments
Yes non linear resources are not yet supported, mostly because the correct behavior is unclear. See this discussion readium/architecture#143 What do you personally expect should happen?
Do you have a sample book with |
I am working on a book for visually impaired youngsters. There is a rather long notice explaining how the options work. I wanted to hide it to avoid too many pages to turn. This notice will only be read once or twice. On my configuration page I have a link to this manual and on the page of this manual I have a link to the configuration page. Since I saw that the option existed I wanted to use it.
Replace the currently visible resource with the non-linear resource. I made a very quick epub with a non-linear resource. |
Thank you, such samples are very useful. This feature is a real can of worms so I doubt we will get a good implementation soon. But maybe we can work out a limited solution in the meantimes, as it's completely broken right now. |
When the user clicks an internal link in the Navigator the link might be to a resource not present in the reading order - example would be a note that was added with linear=no in the epub (Impossible to open a file when linear="no" readium#124). This PR implements a way to intercept such a link click - and also for the listener to tell the Navigator not to navigate to the link - meaning that the app can implement handling the link itself (for example showing a popup with the contents of the link like iBooks do). The implementation is done by extending the Navigator interface with a method called `shouldJumpToLink` that returns true by default and is only called when a link is clicked (when someone calls the `go` method with a link object - which is done when a link internal to the epub is clicked).
To be able to show resources not part of the reading order (like notes, see Impossible to open a file when linear="no" readium#124) it is helpful to be able to provide a special readingOrder list when opening a publication in the navigator. This commit adds readingOrder as an optional parameter with the default value of `Publication.readingOrder` to the epub factory and the fragment. In addition the EPubFragment is now using the provided readingOrder instead of publication.readingOrder in its implementation.
When the user clicks an internal link in the Navigator the link might be to a resource not present in the reading order - example would be a note that was added with linear=no in the epub (Impossible to open a file when linear="no" readium#124). This PR implements a way to intercept such a link click - and also for the listener to tell the Navigator not to navigate to the link - meaning that the app can implement handling the link itself (for example showing a popup with the contents of the link like iBooks do). The implementation is done by extending the Navigator interface with a method called `shouldJumpToLink` that returns true by default and is only called when a link is clicked (when someone calls the `go` method with a link object - which is done when a link internal to the epub is clicked).
To be able to show resources not part of the reading order (like notes, see Impossible to open a file when linear="no" readium#124) it is helpful to be able to provide a special readingOrder list when opening a publication in the navigator. This commit adds readingOrder as an optional parameter with the default value of `Publication.readingOrder` to the epub factory and the fragment. In addition the EPubFragment is now using the provided readingOrder instead of publication.readingOrder in its implementation.
Closing as we've implemented a way for apps to handle non-linear resources and it's not clear if we'll do more. |
Impossible to open a file whose
itemref
attribute islinear="no"
.However it works in Thorium.
The text was updated successfully, but these errors were encountered: