Feature/Custom start page property for f-pdf-viewer #875
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Implements an optional
[startPage]
input property to thef-pdf-viewer
component that accepts a page number that the pdf viewer will scroll to when it renders.This PR adds
[startPage]="2"
to only the f-pdf-viewer used in the tutor inbox section, so that tutors no longer have to scroll past the initial page in every submission.Example:
Notes:
The
startPage
property will default to1
if it's not passed in the component.However, if
startPage
is1
, the initialscrollToPage(this.startPage)
function will not be called inonPageRendered()
since users could already be scrolling down before this is called - andonLoaded()
is called too soon to usescrollToPage()
. (Overall behaviour remains the same)Type of change
How Has This Been Tested?
doubtfire-api/test_files/submissions/1.2P.pdf
into thedoubtfire-api/test_files/unit_files/
directory and rename it tosample-student-submission.pdf
to override the original single page PDFatutor
has access to, then runrake submission:generate_pdfs
indoubtfire-api
atutor
and select any unit, then select either theInbox
orTask Explorer
dropdownTesting Checklist:
Checklist: