epub.js
epub.js copied to clipboard
Continuous Manager inside an element that is scrolling that is not the viewport?
It appears that this code (node_modules/epubjs/lib/managers/continuous/index.js):
observeIfChapterIsInView(view) {
const observer = new IntersectionObserver(entries => {
if (entries[0].isIntersecting === true) {
setTimeout(() => {
if (this.readingDirection === 'backward') {
this.observeMovingBack();
} else {
this.observeMovingForward();
}
}, 500);
}
}, {
threshold: [1]
});
observer.observe(view.element);
}
Means that the continuous scrolling only works when the scrolling element is is the viewport (default since no root is passed explicitly).
Is there an easy way for me to get this to work when the EPUB is rendered into an element that is scrolling that is not the viewport?