GithubHelp home page GithubHelp logo

Comments (3)

danielweck avatar danielweck commented on August 21, 2024

Reflowble viewport is impacted as well:
readium/readium-sdk#84

from sdklauncher-ios.

danielweck avatar danielweck commented on August 21, 2024

Duplicate:
#24

Video:
https://www.dropbox.com/s/uv78dnf56jm8ftm/landscape_zoom_problem.mov

from sdklauncher-ios.

danielweck avatar danielweck commented on August 21, 2024

So, let's do a thought exercise, running iOS Launcher on an iPad.

The root UIWebView document reader.html doesn't do much more than wrapping the iframes for each displayed EPUB content document (i.e. there is no UI "chrome", unlike the cloud reader navigation bar + page buttons), and right now its head>meta/viewport allows the user to use pinch/stretch gestures, with undesirable results: it may "look and feel okay" with fixed layout books (including panning the content with one-two finger drag), but with reflow documents it becomes very confusing.

One option is to "lock" the reader.html viewport:

<meta name="viewport" content="width=device-width,user-scalable=no,initial-scale=1,minimum-scale=1,maximum-scale=1">

This would mean that the touch interaction would not get consumed "natively" by the UIWebView to zoom in/out of the rendered pages, instead code in readium-shared-js would take care of capturing pinch/stretch gestures (maybe double-tap as well) to interpret them as appropriate. This would make it possible to use Readium's built-in "pan + zoom" feature API (just as with the Chrome extension / cloud reader, although this browser-based implementation doesn't handle touch gestures at this point (for anything other than page swipe), but instead provides a menu UI affordance for setting the zoom).

The problem with the above approach is that touch events would not be handled natively, the app would delegate this to the HTML viewport. Not to everybody's taste / vendor integration requirements.

As a point of discussion, it may be important to remember that the cloud reader's "zoom" UI may eventually be used to control reflow font size as well as pixel-perfect zoom, thereby harmonising the concept of "magnification" across pre-paginated fixed layout publications and reflowable documents. Should the iOS touch-based interaction also be used to control font size? (in addition to classic pinch-stretch zoom gestures) This would be a good argument for locking the viewport and installing a custom touch handler, as described above.

Food for thoughts.

from sdklauncher-ios.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.