Pull request #2: red-404
Merge in RED/ui from red-404 to master * commit '439aa88aeec0dcdb147c19d967f9f52e09c2b339': Clean text popup Clean header
This commit is contained in:
commit
56a4fb6b2d
@ -70,6 +70,7 @@ export class PdfViewerComponent implements OnInit, AfterViewInit, OnDestroy {
|
||||
this.wvInstance = instance;
|
||||
this._viewerSyncService.registerViewer(this.fileType, this.wvInstance);
|
||||
this._configureTextPopup();
|
||||
this._configureHeader();
|
||||
instance.docViewer.on('documentLoaded', this.wvDocumentLoadedHandler)
|
||||
instance.loadDocument(pdfBlob, {filename: this.fileStatus ? this.fileStatus.filename : 'file.pdf'});
|
||||
this.fileReady.emit();
|
||||
@ -101,6 +102,14 @@ export class PdfViewerComponent implements OnInit, AfterViewInit, OnDestroy {
|
||||
}
|
||||
|
||||
private _configureTextPopup() {
|
||||
this.wvInstance.disableElements([
|
||||
'textHighlightToolButton',
|
||||
'textUnderlineToolButton',
|
||||
'textSquigglyToolButton',
|
||||
'textStrikeoutToolButton',
|
||||
'linkButton',
|
||||
]);
|
||||
|
||||
this.wvInstance.textPopup.add(<any>{
|
||||
type: 'actionButton',
|
||||
img: '/assets/icons/general/add.svg',
|
||||
@ -112,6 +121,11 @@ export class PdfViewerComponent implements OnInit, AfterViewInit, OnDestroy {
|
||||
});
|
||||
}
|
||||
|
||||
private _configureHeader() {
|
||||
this.wvInstance.disableElements(['ribbons']);
|
||||
this.wvInstance.setToolbarGroup('toolbarGroup-View');
|
||||
}
|
||||
|
||||
ngOnDestroy(): void {
|
||||
this._viewerSyncService.deregisterInstance(this.fileType);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user