Closed carolinepaulic closed 3 years ago
@smitar I updated the Paper
/Annotation
data types and simplified the Reader
effects that set the paper and annotation data based on your suggestions.
@mjlangan I made BoundingBox.page
required and fixed the key issue.
Description
This covers the bulk of https://github.com/allenai/scholar/issues/28339
Changes in this PR:
data
dir where our sample data livesReader
updates:Reader
can just loop through each page and easily get the appropriate annotations from the map. Currently citations are the only entity supported.CitationPopover
updates:CitationsDemo
updates:GeneratesCitationPopovers
based on newpaperAnnotated
propCitationPopovers
based on newannotations
propHighlightOverlayDemo
,TextHighlightDemo
, andScrollToDemo
since we're using a different sample paper nowBoundingBox
functionboundingBoxRawToScaled
to transform raw bounding box coordinates (expressed as a percentage of page size) into coordinates that make sense for our current page sizeAdded newBoundingBox
functionscaleRawBoundingBoxWithContext
- this is used to transform raw bounding box coordinates (expressed as a percentage of page size) into coordinates that make sense for our current page size, scaling, and rotationBoundingBox
page
attribute from optional to requiredUpgraded a lot of types up to classes because we need the constructorsTesting Plan