RED-6245: Added landscape page orientation.
This commit is contained in:
parent
a43c1a36c8
commit
789a9db9b8
@ -1,4 +1,4 @@
|
||||
import { Component, ElementRef, Inject, OnInit, ViewChild } from '@angular/core';
|
||||
import { ChangeDetectorRef, Component, ElementRef, Inject, OnInit, ViewChild } from '@angular/core';
|
||||
import WebViewer, { WebViewerInstance } from '@pdftron/webviewer';
|
||||
import { HttpClient } from '@angular/common/http';
|
||||
import { FormBuilder, FormGroup } from '@angular/forms';
|
||||
@ -64,7 +64,8 @@ export class WatermarkScreenComponent implements OnInit {
|
||||
];
|
||||
readonly orientationOptions = ['DIAGONAL', 'HORIZONTAL', 'VERTICAL'];
|
||||
instance: WebViewerInstance;
|
||||
readonly loaded$ = new BehaviorSubject(false);
|
||||
readonly #loaded$ = new BehaviorSubject(false);
|
||||
readonly loaded$ = this.#loaded$.asObservable().pipe(tap(() => setTimeout(() => this._changeDetectorRef.detectChanges())));
|
||||
@ViewChild('viewer', { static: true }) private readonly _viewer: ElementRef<HTMLDivElement>;
|
||||
readonly #dossierTemplateId = getParam(DOSSIER_TEMPLATE_ID);
|
||||
readonly #watermarkId = Number(getParam(WATERMARK_ID));
|
||||
@ -82,6 +83,7 @@ export class WatermarkScreenComponent implements OnInit {
|
||||
private readonly _watermarkService: WatermarkService,
|
||||
private readonly _userPreferenceService: UserPreferenceService,
|
||||
private readonly _router: Router,
|
||||
private readonly _changeDetectorRef: ChangeDetectorRef,
|
||||
watermarksMapService: WatermarksMapService,
|
||||
) {
|
||||
const watermark$ = watermarksMapService.watch$(this.#dossierTemplateId, this.#watermarkId);
|
||||
@ -200,9 +202,9 @@ export class WatermarkScreenComponent implements OnInit {
|
||||
this.instance.UI.setTheme(this._userPreferenceService.getTheme());
|
||||
|
||||
this.instance.Core.documentViewer.addEventListener('documentLoaded', async () => {
|
||||
this.loaded$.next(true);
|
||||
this._loadingService.stop();
|
||||
await this.#drawWatermark();
|
||||
this.#loaded$.next(true);
|
||||
this._loadingService.stop();
|
||||
});
|
||||
|
||||
if (environment.production) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user