detect changes
This commit is contained in:
parent
33f93592f6
commit
99316c2cab
@ -1,4 +1,4 @@
|
||||
import { ChangeDetectionStrategy, Component, ElementRef, OnInit, ViewChild } from '@angular/core';
|
||||
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, ElementRef, OnInit, ViewChild } from '@angular/core';
|
||||
import { PermissionsService } from '@services/permissions.service';
|
||||
import { Debounce, IconButtonTypes, LoadingService, Toaster } from '@iqser/common-ui';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
@ -38,6 +38,7 @@ export class RulesScreenComponent extends ComponentHasChanges implements OnInit
|
||||
constructor(
|
||||
readonly permissionsService: PermissionsService,
|
||||
private readonly _rulesService: RulesService,
|
||||
private readonly _changeDetectorRef: ChangeDetectorRef,
|
||||
private readonly _dossierTemplatesService: DossierTemplatesService,
|
||||
private readonly _toaster: Toaster,
|
||||
protected readonly _translateService: TranslateService,
|
||||
@ -74,6 +75,7 @@ export class RulesScreenComponent extends ComponentHasChanges implements OnInit
|
||||
},
|
||||
});
|
||||
(window as any).monaco.editor.setTheme('redaction');
|
||||
this._changeDetectorRef.detectChanges();
|
||||
}
|
||||
|
||||
@Debounce()
|
||||
@ -106,6 +108,7 @@ export class RulesScreenComponent extends ComponentHasChanges implements OnInit
|
||||
revert(): void {
|
||||
this.currentLines = this.initialLines;
|
||||
this._decorations = this._codeEditor?.deltaDecorations(this._decorations, []) || [];
|
||||
this._changeDetectorRef.detectChanges();
|
||||
this._loadingService.stop();
|
||||
}
|
||||
|
||||
|
||||
@ -109,6 +109,12 @@ export class PdfViewerUtils {
|
||||
for (const hotkey of DISABLED_HOTKEYS) {
|
||||
this.instance.UI.hotkeys.off(hotkey);
|
||||
}
|
||||
console.log('disable', this.instance);
|
||||
this.instance.UI.hotkeys.off(this.instance.UI.hotkeys.Keys.DOWN);
|
||||
this.instance.UI.hotkeys.off(this.instance.UI.hotkeys.Keys.UP);
|
||||
this.instance.UI.hotkeys.off(this.instance.UI.hotkeys.Keys.PAGE_UP);
|
||||
this.instance.UI.hotkeys.off(this.instance.UI.hotkeys.Keys.PAGE_DOWN);
|
||||
this.instance.UI.hotkeys.off(this.instance.UI.hotkeys.Keys.P);
|
||||
}
|
||||
|
||||
translateQuads(page: number, quads: any) {
|
||||
@ -121,7 +127,7 @@ export class PdfViewerUtils {
|
||||
}
|
||||
|
||||
selectAnnotations(annotations?: AnnotationWrapper[], multiSelectActive: boolean = false) {
|
||||
if (!annotations){
|
||||
if (!annotations) {
|
||||
return;
|
||||
}
|
||||
if (!multiSelectActive) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user