feat: custom start page property for f-pdf-viewer #232
Closed
b0ink wants to merge 2 commits intothoth-tech:8.0.xfrom
Closed
feat: custom start page property for f-pdf-viewer #232b0ink wants to merge 2 commits intothoth-tech:8.0.xfrom
b0ink wants to merge 2 commits intothoth-tech:8.0.xfrom
Conversation
Author
|
merged in upstream |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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-viewercomponent 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
startPageproperty will default to1if it's not passed in the component.However, if
startPageis1, 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.pdfinto thedoubtfire-api/test_files/unit_files/directory and rename it tosample-student-submission.pdfto override the original single page PDFatutorhas access to, then runrake submission:generate_pdfsindoubtfire-apiatutorand select any unit, then select either theInboxorTask ExplorerdropdownTesting Checklist:
Checklist: