Skip to content

Commit

Permalink
fix(pdf-zoom): scrolling issue with toolbar
Browse files Browse the repository at this point in the history
  • Loading branch information
pranavrao145 committed Nov 22, 2024
1 parent 257aace commit cd39093
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 12 deletions.
6 changes: 3 additions & 3 deletions app/assets/javascripts/Components/Result/pdf_viewer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ export class PDFViewer extends React.PureComponent {
const zoomValuesToDisplayName = this.getZoomValuesToDisplayName();

return (
<div>
<React.Fragment>
<div className="toolbar">
<div className="toolbar-actions">
{I18n.t("results.current_rotation", {rotation: this.state.rotationInDegrees})}
Expand All @@ -169,7 +169,7 @@ export class PDFViewer extends React.PureComponent {
<div
id="pdfContainer"
className="pdfContainer"
style={{cursor, userSelect, overflow: "auto"}}
style={{cursor, userSelect}}
ref={this.pdfContainer}
>
<div id="viewer" className="pdfViewer" />
Expand All @@ -181,7 +181,7 @@ export class PDFViewer extends React.PureComponent {
/>
</div>
</div>
</div>
</React.Fragment>
);
}
}
2 changes: 2 additions & 0 deletions app/assets/stylesheets/common/pdfjs_custom.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
.pdfContainerParent {
position: relative;
overflow: auto;
height: 100%;
}

.pdfContainer {
Expand Down
10 changes: 1 addition & 9 deletions app/assets/stylesheets/grader.scss
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,7 @@

/* Panes content (for controlling the heights) */

#codeviewer {
display: flex;
flex-basis: 600px;
flex-direction: column;
flex-grow: 1;
width: 100%;
overflow: hidden;
}

#codeviewer,
#testviewer,
#mark_viewer,
#summary_viewer,
Expand Down

0 comments on commit cd39093

Please sign in to comment.