fixed ngzone for open aswell
This commit is contained in:
parent
37e484b6db
commit
30c112b743
@ -149,6 +149,4 @@
|
||||
</button>
|
||||
</section>
|
||||
|
||||
<button class="hidden" (click)="openManualRedactionDialog()" id="open-manual-redaction-dialog-btn"></button>
|
||||
|
||||
<redaction-full-page-loading-indicator [displayed]="!viewReady"></redaction-full-page-loading-indicator>
|
||||
|
||||
@ -37,7 +37,6 @@ export class FilePreviewScreenComponent implements OnInit {
|
||||
private _readyViewers: string[] = [];
|
||||
private projectId: string;
|
||||
private _activeViewer: 'ANNOTATED' | 'REDACTED' = 'ANNOTATED';
|
||||
private _manualRedactionEntry: AddRedactionRequest;
|
||||
|
||||
@ViewChild(PdfViewerComponent) private _viewerComponent: PdfViewerComponent;
|
||||
@ViewChild('annotations') private _annotationsElement: ElementRef;
|
||||
@ -167,19 +166,12 @@ export class FilePreviewScreenComponent implements OnInit {
|
||||
}
|
||||
|
||||
handleManualAnnotationRequest($event: ManualRedactionEntry) {
|
||||
this._manualRedactionEntry = $event;
|
||||
document.getElementById('open-manual-redaction-dialog-btn').click();
|
||||
}
|
||||
|
||||
openManualRedactionDialog() {
|
||||
const ref = this._dialog.open(ManualRedactionDialogComponent, {
|
||||
width: '600px',
|
||||
maxWidth: '90vw',
|
||||
data: this._manualRedactionEntry
|
||||
});
|
||||
|
||||
ref.afterClosed().subscribe(() => {
|
||||
this._manualRedactionEntry = null;
|
||||
this.ngZone.run(() => {
|
||||
this._dialog.open(ManualRedactionDialogComponent, {
|
||||
width: '600px',
|
||||
maxWidth: '90vw',
|
||||
data: $event
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user