DM-339: Fixed red border not disappearing.
This commit is contained in:
parent
14914b10b2
commit
18197c7e3f
@ -166,6 +166,7 @@ export class FilePreviewScreenComponent
|
||||
);
|
||||
|
||||
effect(() => {
|
||||
this.state.shouldUpdate();
|
||||
if (this._documentViewer.pageComplete()) {
|
||||
this.#setExcludedPageStyles();
|
||||
}
|
||||
@ -625,19 +626,17 @@ export class FilePreviewScreenComponent
|
||||
|
||||
#setExcludedPageStyles() {
|
||||
const file = this._filesMapService.get(this.dossierId, this.fileId);
|
||||
setTimeout(() => {
|
||||
const iframeDoc = this.pdf.instance.UI.iframeWindow.document;
|
||||
const currentPage = this.pdf.currentPage();
|
||||
const elementId = `pageWidgetContainer${currentPage}`;
|
||||
const pageContainer = iframeDoc.getElementById(elementId);
|
||||
if (pageContainer) {
|
||||
if (file.excludedPages.includes(currentPage)) {
|
||||
pageContainer.classList.add('excluded-page');
|
||||
} else {
|
||||
pageContainer.classList.remove('excluded-page');
|
||||
}
|
||||
const iframeDoc = this.pdf.instance.UI.iframeWindow.document;
|
||||
const currentPage = this.pdf.currentPage();
|
||||
const elementId = `pageWidgetContainer${currentPage}`;
|
||||
const pageContainer = iframeDoc.getElementById(elementId);
|
||||
if (pageContainer) {
|
||||
if (file.excludedPages.includes(currentPage)) {
|
||||
pageContainer.classList.add('excluded-page');
|
||||
} else {
|
||||
pageContainer.classList.remove('excluded-page');
|
||||
}
|
||||
}, 100);
|
||||
}
|
||||
}
|
||||
|
||||
#subscribeToFileUpdates(): void {
|
||||
|
||||
@ -44,6 +44,7 @@ export class FilePreviewStateService {
|
||||
readonly dossierId = getParam(DOSSIER_ID);
|
||||
readonly dossierTemplateId = getParam(DOSSIER_TEMPLATE_ID);
|
||||
readonly fileId = getParam(FILE_ID);
|
||||
readonly shouldUpdate = computed(() => this.file().excludedPages);
|
||||
|
||||
constructor(
|
||||
private readonly _permissionsService: PermissionsService,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user