You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to epub book reader using epub-js and React Native. I found epubjs-react-native which is a wrapper over this library for convenient using in RN.
I want to make a continuous scroll throughout the whole book. To do this, I changed the corresponding parameters (see screenshot, manager is method in epub-js). So, after I set method=continuous and flow=scrolled the problem shown in the video appears on Android: when navigating to any chapter, the movement is incorrect. At the same time, everything works correctly on the iPhone.
I investigated epubjs-react-native source code and found that it only calls rendition.display() method to change the location, so I decided to dive into epub-js code because epubjs-react-native doesn't have any side effects on it.
In epub-js code, I was focused on the continuous manager's index.js file. There is update() and check() functions. During debugging, I found that after rendition.display() call the first navigation happens correctly (the exact location that is needed opens) but then update() or check() (I can't say exactly) methods are called again and moves book content to the wrong location. I tried to modify the code for a couple of days but there are a lot of variables and it's hard to understand their purpose without deep knowledge of this library's logic.
I would be very grateful if someone could tell me what the problem is.
Hi there!
I'm trying to epub book reader using epub-js and React Native. I found epubjs-react-native which is a wrapper over this library for convenient using in RN.
I want to make a continuous scroll throughout the whole book. To do this, I changed the corresponding parameters (see screenshot,
manager
ismethod
in epub-js). So, after I setmethod=continuous
andflow=scrolled
the problem shown in the video appears on Android: when navigating to any chapter, the movement is incorrect. At the same time, everything works correctly on the iPhone.I investigated epubjs-react-native source code and found that it only calls
rendition.display()
method to change the location, so I decided to dive into epub-js code because epubjs-react-native doesn't have any side effects on it.In epub-js code, I was focused on the continuous manager's
index.js
file. There isupdate()
andcheck()
functions. During debugging, I found that afterrendition.display()
call the first navigation happens correctly (the exact location that is needed opens) but thenupdate()
orcheck()
(I can't say exactly) methods are called again and moves book content to the wrong location. I tried to modify the code for a couple of days but there are a lot of variables and it's hard to understand their purpose without deep knowledge of this library's logic.I would be very grateful if someone could tell me what the problem is.
417603789-1e0eb58a-d344-45e2-94bf-a472fd5ee9ae.mov
cc @fchasen @JakeHartnell
The text was updated successfully, but these errors were encountered: