Merge branch 'master' into VM/RED-6240
This commit is contained in:
commit
b33abddcc2
@ -1,7 +1,7 @@
|
||||
import { inject, Injectable } from '@angular/core';
|
||||
import { Core } from '@pdftron/webviewer';
|
||||
import { NGXLogger } from 'ngx-logger';
|
||||
import { fromEvent, merge, Observable, Subject } from 'rxjs';
|
||||
import { fromEvent, merge, Observable } from 'rxjs';
|
||||
import { debounceTime, filter, map, tap } from 'rxjs/operators';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
import { PdfViewer } from './pdf-viewer.service';
|
||||
@ -23,8 +23,6 @@ export class REDDocumentViewer {
|
||||
selectedText = '';
|
||||
#document: DocumentViewer;
|
||||
|
||||
readonly #documentClosed$ = new Subject<undefined>();
|
||||
|
||||
readonly #logger = inject(NGXLogger);
|
||||
readonly #userPreferenceService = inject(UserPreferenceService);
|
||||
readonly #pdf = inject(PdfViewer);
|
||||
@ -39,7 +37,7 @@ export class REDDocumentViewer {
|
||||
}
|
||||
|
||||
get #documentUnloaded$() {
|
||||
const event$ = merge(fromEvent(this.#document, 'documentUnloaded'), this.#documentClosed$);
|
||||
const event$ = fromEvent(this.#document, 'documentUnloaded');
|
||||
const toBool$ = event$.pipe(map(() => false));
|
||||
|
||||
return toBool$.pipe(tap(() => this.#logger.info('[PDF] Document unloaded')));
|
||||
@ -101,8 +99,6 @@ export class REDDocumentViewer {
|
||||
}
|
||||
|
||||
close() {
|
||||
this.#documentClosed$.next(undefined);
|
||||
|
||||
const closeAction = async () => {
|
||||
this.#logger.info('[PDF] Closing document');
|
||||
this.#document.closeDocument();
|
||||
@ -173,7 +169,7 @@ export class REDDocumentViewer {
|
||||
}
|
||||
|
||||
async #flattenAnnotations() {
|
||||
const pdfDoc = await this.#document.getDocument().getPDFDoc();
|
||||
const pdfDoc = await this.PDFDoc;
|
||||
await pdfDoc.flattenAnnotations(false);
|
||||
}
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "redaction",
|
||||
"version": "4.30.0",
|
||||
"version": "4.31.0",
|
||||
"private": true,
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
|
||||
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user