Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

flipNext() and flip(to_page) don't work when disableFlipByClick is true #18

Closed
chaszzzbrown opened this issue Mar 23, 2021 · 0 comments
Closed

Comments

@chaszzzbrown
Copy link

When disableByFlipClick is true, flipNext() has no effect; and flipToPage(pagenum) does nothing when the pagenum > currentpage.

Why? Because at line 245 of Flip.ts, the flipNext method simulates a lick at the right edge (top or bottom) of the displayRect and calls .flip(). But at line 80 of Flip.ts, only when disableFlipByClick is true, there is a test to see if the point passed in is within the display bounds; which fails because the x value is NOT strictly less than the displayWidth (it's equal to it).

I don't have the rig set up to recompile and test TypeScript so I won't post a pull request, but the fix is to edit line 245 of Flip.ts so that the x value passed in is a few pxiels less than the displayWidth; e.g. edit line 245 of Flip.ts to read:

x: this.render.getRect().left + this.render.getRect().pageWidth * 2 - 10,

and that fixes both flipNext() and flipToPage. (In my case, I just monkey-patched it.) Hope that helps!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants