Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(pdf viewer): menubar is broken #1160

Merged
merged 8 commits into from
Jul 25, 2023
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
>
</pdf-viewer>

<div class="toolbar">
<div>
<div class="action horizontal bottom">
<!-- caption -->
<span>
Expand Down Expand Up @@ -94,9 +94,6 @@

<!-- empty placeholders to center the zoom buttons -->
<span class="fill-remaining-space"></span>
<span class="empty-space"></span>
<span class="empty-space"></span>
<span class="empty-space"></span>

<!-- full screen button -->
<span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,12 @@ $osd-height: 460px;
}

.pdf-container {
color: $bright;
height: 90%;
height: 100%;
background-color: $dark;
border-radius: 8px 8px 0px 0px;

pdf-viewer {
position: inherit;
height: 100%;

::ng-deep .ng2-pdf-viewer-container {
height: 90%;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,6 @@ export class DocumentComponent implements OnInit, AfterViewInit {

ngOnInit(): void {
this.fileType = this._getFileType(this.src.fileValue.filename);
if (this.fileType === 'pdf') {
this.elem = document.getElementsByClassName('pdf-viewer')[0];
}

this._rs
.getFileInfo(this.src.fileValue.fileUrl)
Expand All @@ -88,6 +85,10 @@ export class DocumentComponent implements OnInit, AfterViewInit {
}

ngAfterViewInit() {
if (this.fileType === 'pdf') {
this.elem = document.getElementsByClassName('pdf-viewer')[0];
console.log(this.elem);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please remove :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

... :-)

}
this.loaded.emit(true);
}

Expand Down
1 change: 1 addition & 0 deletions apps/dsp-app/src/styles/_elements.scss
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,7 @@ a,
}

&.bottom {
background-color: inherit;
bottom: 0;
}
}
Expand Down