Skip to content

Commit

Permalink
removed position bug
Browse files Browse the repository at this point in the history
  • Loading branch information
CD-Z committed Aug 15, 2023
1 parent 6cfd928 commit 77a117f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/screens/reader/ReaderScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -213,9 +213,13 @@ const ChapterContent = ({ route, navigation }) => {
updateTracker();
}
});

useEffect(() => {
webViewRef?.current?.injectJavaScript(
`${!readerPages} && document.querySelector('chapter').style.transform = 'translate(0%)';`,
);
}, [readerPages]);
const scrollTo = useCallback(
(offset, axis = 'Y') => {
offset => {
console.log('offset', offset);
requestAnimationFrame(() => {
webViewRef?.current?.injectJavaScript(
Expand Down

0 comments on commit 77a117f

Please sign in to comment.