diff --git a/lib/core/src/lib/viewer/components/pdf-viewer.component.html b/lib/core/src/lib/viewer/components/pdf-viewer.component.html index 41a478e77db..9844cf51734 100644 --- a/lib/core/src/lib/viewer/components/pdf-viewer.component.html +++ b/lib/core/src/lib/viewer/components/pdf-viewer.component.html @@ -16,10 +16,8 @@ - - - - + + diff --git a/lib/core/src/lib/viewer/components/pdf-viewer.component.spec.ts b/lib/core/src/lib/viewer/components/pdf-viewer.component.spec.ts index a3361d08373..e33a9e0f22f 100644 --- a/lib/core/src/lib/viewer/components/pdf-viewer.component.spec.ts +++ b/lib/core/src/lib/viewer/components/pdf-viewer.component.spec.ts @@ -27,6 +27,8 @@ import { take } from 'rxjs/operators'; import { AppConfigService } from '../../app-config/app-config.service'; import { CoreTestingModule } from '../../testing/core.testing.module'; import { TranslateModule } from '@ngx-translate/core'; +import { PdfThumbListComponent } from '@alfresco/adf-core'; +import { By } from '@angular/platform-browser'; declare const pdfjsLib: any; @@ -354,6 +356,13 @@ describe('Test PdfViewer component', () => { done(); }); }, 55000); + + it('should not render PdfThumbListComponent during initialization of new pdfViewer', () => { + componentUrlTestComponent.pdfViewerComponent.toggleThumbnails(); + componentUrlTestComponent.urlFile = 'file.pdf'; + fixtureUrlTestComponent.detectChanges(); + expect(fixtureUrlTestComponent.debugElement.query(By.directive(PdfThumbListComponent))).toBeNull(); + }); }); describe('Viewer events', () => { diff --git a/lib/core/src/lib/viewer/components/pdf-viewer.component.ts b/lib/core/src/lib/viewer/components/pdf-viewer.component.ts index 91816fe5575..08f535fd25b 100644 --- a/lib/core/src/lib/viewer/components/pdf-viewer.component.ts +++ b/lib/core/src/lib/viewer/components/pdf-viewer.component.ts @@ -205,6 +205,7 @@ export class PdfViewerComponent implements OnChanges, OnDestroy { this.loadingPercent = Math.round(level * 100); }; + this.isPanelDisabled = true; this.loadingTask.promise .then((pdfDocument: PDFDocumentProxy) => { this.totalPages = pdfDocument.numPages;