Dex-chan lover
- Joined
- Jan 18, 2018
- Messages
- 132
It's a small and not very important improvement, but I decided to suggest anyway.
Currently, the reader's current page seems to be calculated by the first image visible to on the screen (even if only a small fraction of it), so we get awkward moments like this:
What I suggest is to change that logic by having the current page being calculated by the image with the higher percentage of its area visible.
So in the example above, Page 1 would have about 3% of its area visible, while Page 2 has 99% and all other pages have 0%, so the reader would mark the current page as 2 instead of 1.
I use this format on an userscript for another site and personally I think it works very well. It basically gets the getBoundingClientRect() from each image loaded and uses the height to calculates how much is on/off-screen to find which one has the highest percentage of visible area.
Currently, the reader's current page seems to be calculated by the first image visible to on the screen (even if only a small fraction of it), so we get awkward moments like this:

What I suggest is to change that logic by having the current page being calculated by the image with the higher percentage of its area visible.
So in the example above, Page 1 would have about 3% of its area visible, while Page 2 has 99% and all other pages have 0%, so the reader would mark the current page as 2 instead of 1.
I use this format on an userscript for another site and personally I think it works very well. It basically gets the getBoundingClientRect() from each image loaded and uses the height to calculates how much is on/off-screen to find which one has the highest percentage of visible area.