RED-3367: Disable action for pages of the file uploaded for comparison
This commit is contained in:
parent
0b71dab1db
commit
f7028da7c5
@ -289,11 +289,18 @@ export class PdfViewerComponent extends AutoUnsubscribe implements OnInit, OnCha
|
||||
}
|
||||
});
|
||||
|
||||
this.documentViewer.addEventListener('textSelected', async (quads, selectedText) => {
|
||||
this.documentViewer.addEventListener('textSelected', async (quads, selectedText, pageNumber: number) => {
|
||||
this._selectedText = selectedText;
|
||||
const textActions = [dataElements.ADD_DICTIONARY, dataElements.ADD_FALSE_POSITIVE];
|
||||
|
||||
const file = await this.stateService.file;
|
||||
|
||||
if (this.viewModeService.isCompare && pageNumber % 2 === 0) {
|
||||
this.instance.UI.disableElements(['textPopup']);
|
||||
} else {
|
||||
this.instance.UI.enableElements(['textPopup']);
|
||||
}
|
||||
|
||||
if (selectedText.length > 2 && this.canPerformActions && !this.utils.isCurrentPageExcluded(file)) {
|
||||
this.instance.UI.enableElements(textActions);
|
||||
} else {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user