#68 closed #155 Navigate to specific page input and close not displayed

This commit is contained in:
Eugenio Romano 2016-06-08 01:05:39 +01:00
parent f1424d1a8a
commit 5e43ec41b6
2 changed files with 13 additions and 0 deletions

View File

@ -4,6 +4,7 @@
.viewer-loader-text {
text-align: center;
color: #000;
}
:host .page {

View File

@ -42,6 +42,8 @@ export class ViewerComponent {
@Output()
showViewerChange: EventEmitter<boolean> = new EventEmitter<boolean>();
otherMenu: any;
nameFile: string;
currentPdfDocument: any;
page: number;
@ -52,6 +54,7 @@ export class ViewerComponent {
ngOnChanges(changes) {
if (this.showViewer) {
this.hideOtherMenu();
if (!this.urlFile) {
throw new Error('Attribute urlFile is required');
}
@ -71,6 +74,9 @@ export class ViewerComponent {
* close the viewer
*/
close() {
if (this.otherMenu) {
this.otherMenu.hidden = false;
}
this.showViewer = false;
this.showViewerChange.emit(this.showViewer);
}
@ -151,4 +157,10 @@ export class ViewerComponent {
return localStorage.getItem('token');
}
private hideOtherMenu() {
this.otherMenu = document.querySelector("header");
if (this.otherMenu) {
this.otherMenu.hidden = true;
}
}
}