RED-6922 remove ngZone.run from event listeners
This commit is contained in:
parent
aeebd0a5f7
commit
8d15fb07ea
@ -145,40 +145,32 @@ export class REDDocumentViewer {
|
||||
|
||||
#listenForDocEvents() {
|
||||
this.#document.addEventListener('textSelected', (quads: Quad, selectedText: string, pageNumber: number) => {
|
||||
this.#ngZone.run(() => {
|
||||
this.#disableTextPopupIfCompareMode(pageNumber);
|
||||
this.#selectedText.set(selectedText);
|
||||
});
|
||||
this.#selectedText.set(selectedText);
|
||||
this.#disableTextPopupIfCompareMode(pageNumber);
|
||||
});
|
||||
|
||||
this.#document.addEventListener('pageComplete', event => {
|
||||
this.#ngZone.run(() => {
|
||||
setTimeout(() => {
|
||||
this.#pageComplete.set(event);
|
||||
}, 300);
|
||||
});
|
||||
setTimeout(() => {
|
||||
this.#pageComplete.set(event);
|
||||
}, 300);
|
||||
});
|
||||
|
||||
this.#document.addEventListener('documentUnloaded', () => {
|
||||
this.#ngZone.run(() => {
|
||||
this.#logger.info('[PDF] Document unloaded');
|
||||
this.#loaded.set(false);
|
||||
});
|
||||
this.#logger.info('[PDF] Document unloaded');
|
||||
this.#loaded.set(false);
|
||||
});
|
||||
|
||||
this.#document.addEventListener('documentLoaded', () => {
|
||||
this.#ngZone.run(() => {
|
||||
this.#logger.info('[PDF] Document loaded');
|
||||
this.#logger.info('[PDF] Document loaded');
|
||||
|
||||
this.#pdf.runWithCleanup(() => {
|
||||
this.#flattenAnnotations().then();
|
||||
this.#setCurrentPage();
|
||||
this.#setInitialDisplayMode();
|
||||
this.updateTooltipsVisibility();
|
||||
});
|
||||
|
||||
this.#loaded.set(true);
|
||||
this.#pdf.runWithCleanup(() => {
|
||||
this.#flattenAnnotations().then();
|
||||
this.#setCurrentPage();
|
||||
this.#setInitialDisplayMode();
|
||||
this.updateTooltipsVisibility();
|
||||
});
|
||||
|
||||
this.#loaded.set(true);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "redaction",
|
||||
"version": "4.126.0",
|
||||
"version": "4.128.0",
|
||||
"private": true,
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user