GithubHelp home page GithubHelp logo

Comments (6)

danielweck avatar danielweck commented on July 22, 2024

See candidate fix in feature branch:
https://github.com/readium/readium-shared-js/tree/feature/scroll_img_resize

UPDATE: feature branch now deleted, but commit preserved as reference (proposal: scroll view acts like regular scrolling webpage => no arbitrary resize-to-fit imposed by reading system, just application of authored CSS styles).

Code diff:
30c0ecd

I do not think that this is a fully-satisfactory solution though, as many books I tried have image width/height either set via CSS or attributes, and the application of maximum values irrespective of aspect ratio sometimes produces unexpected / undesirable results. Furthermore, some images do not resize when opening the page for the first time, only when resizing the viewport.

In fairness though, the same problem already exists with the columnized paginated view:
https://github.com/readium/readium-shared-js/blob/develop/js/views/reflowable_view.js#L669

...so one could argue that the behaviour should be consistent across all types of reflowable views, and that we should apply the same image resizing algorithm to the scroll view?

from readium-shared-js.

danielweck avatar danielweck commented on July 22, 2024

See also: #45

from readium-shared-js.

danielweck avatar danielweck commented on July 22, 2024

See also:
#88

from readium-shared-js.

danielweck avatar danielweck commented on July 22, 2024

Shared utility function between scroll and column-paginated views:

a64dc4d

Feature branch:

https://github.com/readium/readium-shared-js/tree/feature/scroll_img_resize

UPDATE: feature branch now deleted, but commit preserved as reference (proposal: scroll view acts like regular scrolling webpage => no arbitrary resize-to-fit imposed by reading system, just application of authored CSS styles).

from readium-shared-js.

rkwright avatar rkwright commented on July 22, 2024

I created a test file and verified this bug in the current build of the Chrome Extension. The file is here:
https://readiumfoundation.box.com/s/c9rxcdaszp39dswiw7su

from readium-shared-js.

ryanackley avatar ryanackley commented on July 22, 2024

We'll need to add this for svg's as well in your feature branch. It's just a matter of adding 'svg' to the jquery selector we use.

from readium-shared-js.

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.