Closed carolinepaulic closed 3 years ago
Trying again after my previous PR: https://github.com/allenai/pdf-component-library/pull/41
Changes in this PR:
catch
finally
onPdfLoadSuccess
getFirstPage
isLoading
scale
computePageDimensions
IPDFPageProxy
PDFPageProxy
PdfPageSizeData
Point
Description
Trying again after my previous PR: https://github.com/allenai/pdf-component-library/pull/41
Changes in this PR:
catch
andfinally
blocks toonPdfLoadSuccess
handlercatch
accounts for potential errors thrown bygetFirstPage
finally
setsisLoading
to false regardless of whether an error is thrown or notscale
'scomputePageDimensions
to accept anIPDFPageProxy
instead of individual properties from aPDFPageProxy
as it was previously doing.IPDFPageProxy
to make unit testing easierPdfPageSizeData
andPoint
types that are no longer usedTesting Plan
getFirstPage
to ensure thecatch
andfinally
blocks are working as intended