mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-2290] PDF Viewer - scroll event dispatch outside view container (#2922)
* use viewer pagechange event over document scroll * undo declaration component deletion * safe ngOnDestroy * preserve context
This commit is contained in:
committed by
Eugenio Romano
parent
6072a987c9
commit
3368607aff
@@ -368,14 +368,15 @@ describe('Test PdfViewer component', () => {
|
||||
fixture.whenStable().then(() => {
|
||||
|
||||
expect(component.displayPage).toBe(1);
|
||||
|
||||
component.inputPage('2');
|
||||
fixture.detectChanges();
|
||||
expect(component.displayPage).toBe(2);
|
||||
let documentContainer = element.querySelector('.viewer-pdf-container');
|
||||
documentContainer.scrollTop = 100000;
|
||||
component.watchScroll(documentContainer);
|
||||
|
||||
component.pdfViewer.currentPageNumber = 6;
|
||||
fixture.detectChanges();
|
||||
expect(component.displayPage).toBe(6);
|
||||
expect(component.page).toBe(6);
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user