[ADF-2438] fixed thumbnails height (#3407)

* [ADF-2438] calculate thumbnail height

* [ADF-2438] send height to parent element

* [ADF-2438] add width to css

* [ADF-2438] moved height and width logic to parent component

* [ADF-2438] added height and width logic to parent component

* [ADF-2438] fixed failing test
This commit is contained in:
Georgiana Roman
2018-06-04 14:20:20 +03:00
committed by Eugenio Romano
parent 2f51b9f2b8
commit 1266acc4ab
6 changed files with 42 additions and 28 deletions

View File

@@ -28,12 +28,17 @@ describe('PdfThumbComponent', () => {
const domSanitizer = {
bypassSecurityTrustUrl: () => 'image-data'
};
const width = 91;
const height = 119;
const page = {
id: 'pageId',
getPage: jasmine.createSpy('getPage').and.returnValue(Promise.resolve({
getViewport: () => ({ height: 0, width: 0 }),
getViewport: () => ({ height: width, width: height }),
render: jasmine.createSpy('render').and.returnValue(Promise.resolve())
}))
})),
getWidth: jasmine.createSpy('getWidth').and.returnValue(width),
getHeight: jasmine.createSpy('getHeight').and.returnValue(height)
};
setupTestBed({