johnfactotum / foliate

Read e-books in style
https://johnfactotum.github.io/foliate/
GNU General Public License v3.0
5.25k stars 254 forks source link

Page swipe does nothing in RTL manga #1291

Open versalinyaa opened 2 months ago

versalinyaa commented 2 months ago

Page swipe, by either touchscreen or touchpad, does nothing in RTL manga.

Expected behavior

In RTL manga, the following works correctly:

The following does not work. It does absolutely nothing.

Version:

Additional context

I love Foliate. Thanks for making a greap app!

I've never debugged a GTK app before, but I can help if you provide a little guidance. For example, how do I insert debug log messages into the javascript and view them?

I began examing the scroll code in epub.js, and how dx/dy and vx/vy are processed, but I became lost without the ability to insert debug messages.

johnfactotum commented 2 months ago

It's not really possible to do that with the current fixed-layout renderer, which doesn't support offsetting and snapping the page (the scrollBy() and snap() methods of the paginator). Apart from implementing those, one workaround would be to partially undo d3619e7acdb01e6f3841336b737ec90051905ca0, to get back non-1-to-1 gestures for fixed-layout books.

Technically this is a duplicate of #1225, as all fixed layout books, including PDF, use the same renderer and have the same problem.