Skip to content
YACReader
If you know how to improve YACReader, please tell me your ideas.

A Different Page Advance Distance

  • jockohomo
  • Topic Author
  • Offline
  • New Member
  • New Member
More
7 years 5 months ago #4559 by jockohomo
A Different Page Advance Distance was created by jockohomo
When using YACReader, the distance that it advances a page (when I touch the screen) is uneven. With my iPad in landscape mode, when the page advances from the top, it moves a certain distance but when you continue to advance with the next tap, the screen only advances maybe half as much. That is to say, screen jump is quite large while the second one is rather small.

Even worse, if you advance from some random somewhere in the middle, you can get advanced to very near the bottom so that a subsequent tap will only advance you a couple of image lines, making you wonder why it didn't just move to the bottom of the screen to begin with.

It appears that the amount you advance the page with a tap is constant and doesn't change at all despite the context of the page view. I think this can be improved.

I think a better algorithm would be to split the page up into N views (I would default N to 3) and always advance the screen an even amount, that amount depending on which of the N views the current position is closest to. I can write pseudocode to demonstrate the algorithm but, for now, I'll simply try to describe it in detail, in English.

For example, if you start from the top, you would take the difference between the bottom of the current view (from the top) and divide it by 2 and that would be the amount you advance the page (when tapped). That way, if you were to progress the screen two times (giving three views of the page), the three views of the screen will be offset the same amount (an even amount).

If you were to manually move the page view some amount down the page, you would determine which of the N predetermined views the current view is closest to and use that to calculate the number of page advances to split the remaining distance of the page. For example, if the view were moved just a little bit down so the closest predetermined view is still the top view, you would simply do the same above calculation of dividing the rest of the page distance from the current view by 2 (to split the page into 3 views). However, if you manually moved the view by enough so that it's actually closer to the middle view than the top view, you'd then divide the distance by 1 ie simply move the view to the bottom of the page. This algorithm might sound funny in this case but that's only because the default is 3. If it were some higher number, you'd see the generalization...

Please let me know if this is understandable. Again, I can post pseudocode to explain in great detail what I mean. The ultimate demonstration, of course, would be to simply modify the source code for YACReader and show you how it works and you (or any testers) can decide if it's an improvement. However, I'm guessing that the source code for the iOS app isn't open sourced for a reason...

Thank you!

Please Log in or Create an account to join the conversation.

More
7 years 3 months ago #4585 by Luis Ángel
Replied by Luis Ángel on topic A Different Page Advance Distance
Thanks for the suggestion. Yeah, the algorithm can be improved, now it takes into consideration the page and screen sizes and tries to guess the best steps sequence.

I will probably update how it works after adding double page mode support....

Contribute to the project becoming a patron: www.patreon.com/yacreader
You can also donate via Pay-Pal: www.paypal.com/donate?business=5TAMNQCDD...e=Support+YACReader\

Please Log in or Create an account to join the conversation.

Moderators: Luis Ángel
Powered by Kunena Forum

Thanks for downloading YACReader!

Your download is starting.

YACReader for iOS and Android

Connect to YACReaderLibrary to browse, read remotely and import comics. Your reading progress is synchronized across devices.

Download on the App Store Get it on Google Play Available at Amazon Appstore

Discover all the features on the iOS and Android pages, and learn how to use them in the iOS and Android user guides.

Support YACReader

YACReader for desktop and server is free to use, but it is not free to develop: maintaining this website, developer programs, code signing certificates, test devices and, of course, all the time it takes. Less than 0.01% of downloads end in a donation, so any amount counts.

By supporting the project you help keep it regularly updated and, most importantly, alive. Thanks!