-
Notifications
You must be signed in to change notification settings - Fork 209
Description
Hi! I'm having an issue, as provided in the title, with the pinch zoom gesture (on both Android and iOS devices) while setting the viewer in infinite-scroll mode.
Here's what I observe: when in 'multiple' page mode, I can zoom without issues on a single page. When I switch to the 'infinite-scroll' page mode, no matter what page I'm on, doing a pinch zoom would result in a scroll to the first page.
Below there's a video demonstrating the issue. I believe I'm missing something altogether, or I'm using the 'infinite-scroll' mode the wrong way. Is there a method to have the zoom focusing on a single page? I'm already detecting if I'm in a specific page by doing this (because, as I understand, in this mode the PDF is rendered as a single, very long page):
const pages=document.getElementsByClassName('page');
this.currentPage.set(Array.prototype.slice.call(pages).filter((el:HTMLDivElement)=>{
const rectEl=el.getBoundingClientRect();
let isScrolled: boolean;
isScrolled=rectEl.top <= (window.innerHeight || document.documentElement.clientHeight)/2
return isScrolled
}).length);Below is a video example of the issue.
This issue also occurs while programmatically setting the zoom level.
screen-20251107-145303.mp4
Let me know if you need more informations about it. Thank you!
Describe the bug
I reproduced the issue this way:
- Load a multi-page PDF document (the issue is not related to a specific document)
- Set the viewer in 'infinite-scroll' page mode
- Scroll to a page > 1 (so not the first one)
- Do a pinch zoom gesture
Version info
- Tested version is 23.3.1, on Angular 19