mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-12 17:04:57 +00:00
fix test viewer
This commit is contained in:
parent
f44eaae410
commit
e17604e47d
@ -65,6 +65,8 @@ export class PdfViewerComponent {
|
||||
|
||||
this.currentPdfDocument.getPage(1).then(() => {
|
||||
this.scalePage('auto');
|
||||
}, (error) => {
|
||||
reject(error);
|
||||
});
|
||||
|
||||
}, (error) => {
|
||||
@ -120,7 +122,7 @@ export class PdfViewerComponent {
|
||||
let widthContainer;
|
||||
let heigthContainer;
|
||||
|
||||
if (viewerContainer.clientWidth <= documentContainer.clientWidth) {
|
||||
if (viewerContainer && viewerContainer.clientWidth <= documentContainer.clientWidth) {
|
||||
widthContainer = viewerContainer.clientWidth;
|
||||
heigthContainer = viewerContainer.clientHeight;
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user