update to PDFtron 7.2.0
This commit is contained in:
parent
d98de3bac0
commit
aeff540dce
@ -231,10 +231,12 @@ export class FilePreviewScreenComponent implements OnInit, OnDestroy {
|
||||
private _rebuildFilters(deletePreviousAnnotations: boolean = false) {
|
||||
const startTime = new Date().getTime();
|
||||
if (deletePreviousAnnotations) {
|
||||
const existingAnnotations = this.annotations.map((a) => this.activeViewer.annotManager.getAnnotationById(a.id));
|
||||
this.activeViewer.annotManager.deleteAnnotations(existingAnnotations, true, true);
|
||||
this.activeViewer.annotManager.deleteAnnotations(this.activeViewer.annotManager.getAnnotationsList(), {
|
||||
imported: true,
|
||||
force: true
|
||||
});
|
||||
}
|
||||
console.log('[REDACTION] Delete previous annotations time: ' + (new Date().getTime() - startTime));
|
||||
console.log('[REDACTION] Delete previous annotations time: ' + (new Date().getTime() - startTime) + 'ms');
|
||||
const processStartTime = new Date().getTime();
|
||||
this.annotationData = this.fileData.getAnnotations(
|
||||
this.appStateService.dictionaryData[this.appStateService.activeProject.ruleSetId],
|
||||
@ -245,7 +247,7 @@ export class FilePreviewScreenComponent implements OnInit, OnDestroy {
|
||||
const annotationFilters = this._annotationProcessingService.getAnnotationFilter(this.annotations);
|
||||
this.annotationFilters = processFilters(this.annotationFilters, annotationFilters);
|
||||
this.filtersChanged(this.annotationFilters);
|
||||
console.log('[REDACTION] Process time: ' + (new Date().getTime() - processStartTime));
|
||||
console.log('[REDACTION] Process time: ' + (new Date().getTime() - processStartTime) + 'ms');
|
||||
console.log(
|
||||
'[REDACTION] Annotation Redraw and filter rebuild time: ' +
|
||||
(new Date().getTime() - startTime) +
|
||||
@ -584,7 +586,7 @@ export class FilePreviewScreenComponent implements OnInit, OnDestroy {
|
||||
private _findAndDeleteAnnotation(id: string) {
|
||||
const viewerAnnotation = this.activeViewer.annotManager.getAnnotationById(id);
|
||||
if (viewerAnnotation) {
|
||||
this.activeViewer.annotManager.deleteAnnotation(viewerAnnotation, true, true);
|
||||
this.activeViewer.annotManager.deleteAnnotation(viewerAnnotation, { imported: true, force: true });
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -23,7 +23,7 @@ export class AnnotationDrawService {
|
||||
});
|
||||
|
||||
const annotationManager = activeViewer.annotManager;
|
||||
annotationManager.addAnnotations(annotations, true);
|
||||
annotationManager.addAnnotations(annotations, { imported: true });
|
||||
annotationManager.drawAnnotationsFromList(annotations);
|
||||
|
||||
if (this._userPreferenceService.areDevFeaturesEnabled) {
|
||||
@ -47,7 +47,7 @@ export class AnnotationDrawService {
|
||||
});
|
||||
}
|
||||
const annotationManager = activeViewer.annotManager;
|
||||
annotationManager.addAnnotations(sections, true);
|
||||
annotationManager.addAnnotations(sections, { imported: true });
|
||||
annotationManager.drawAnnotationsFromList(sections);
|
||||
}
|
||||
|
||||
@ -131,7 +131,7 @@ export class AnnotationDrawService {
|
||||
const x4 = rectangle.topLeft.x;
|
||||
const y4 = pageHeight - rectangle.topLeft.y;
|
||||
|
||||
return new activeViewer.Annotations.Quad(x1, y1, x2, y2, x3, y3, x4, y4);
|
||||
return new activeViewer.CoreControls.Math.Quad(x1, y1, x2, y2, x3, y3, x4, y4);
|
||||
}
|
||||
|
||||
public annotationToQuads(annotation: Annotations.Annotation, activeViewer: WebViewerInstance, pageNumber: number) {
|
||||
@ -147,6 +147,6 @@ export class AnnotationDrawService {
|
||||
const x4 = annotation.getRect().x1;
|
||||
const y4 = annotation.getRect().y1;
|
||||
|
||||
return new activeViewer.Annotations.Quad(x1, y1, x2, y2, x3, y3, x4, y4);
|
||||
return new activeViewer.CoreControls.Math.Quad(x1, y1, x2, y2, x3, y3, x4, y4);
|
||||
}
|
||||
}
|
||||
|
||||
@ -49,7 +49,7 @@
|
||||
"@ngx-translate/core": "^13.0.0",
|
||||
"@ngx-translate/http-loader": "^6.0.0",
|
||||
"@nrwl/angular": "^10.2.0",
|
||||
"@pdftron/webviewer": "^7.0.1",
|
||||
"@pdftron/webviewer": "^7.2.0",
|
||||
"file-saver": "^2.0.2",
|
||||
"jwt-decode": "^3.0.0",
|
||||
"keycloak-angular": "^8.0.1",
|
||||
|
||||
15
yarn.lock
15
yarn.lock
@ -2245,10 +2245,10 @@
|
||||
tmp "0.0.33"
|
||||
yargs "15.4.1"
|
||||
|
||||
"@pdftron/webviewer@^7.0.1":
|
||||
version "7.0.1"
|
||||
resolved "https://registry.yarnpkg.com/@pdftron/webviewer/-/webviewer-7.0.1.tgz#0dcf6aad099adfce151a14e3ad7679865ceec038"
|
||||
integrity sha512-yyN4f1HjMpPHrHrOZSlVLEbVLKJvaGBh476mkfFshI9FAVc5xGKi3ukpv0WPTa9T2S2xFYyclxbPfIBa46Uh8Q==
|
||||
"@pdftron/webviewer@^7.2.0":
|
||||
version "7.2.0"
|
||||
resolved "https://registry.yarnpkg.com/@pdftron/webviewer/-/webviewer-7.2.0.tgz#2e81f09cc5c58fa4f4ac231821b7512d5efd4879"
|
||||
integrity sha512-Nh2O1Gb/H02q3VMwIJQMZNpfBHQ7Te/Cnpz+bu9Pyn9cibHboSZIZ2PJAeYzrzR1P70JWORrAHFL6AvH0JrDoA==
|
||||
|
||||
"@rollup/plugin-commonjs@^15.0.0":
|
||||
version "15.1.0"
|
||||
@ -8464,13 +8464,6 @@ ng2-ace-editor@^0.3.9:
|
||||
ace-builds "^1.4.2"
|
||||
brace "^0.11.1"
|
||||
|
||||
ng2-file-upload@^1.4.0:
|
||||
version "1.4.0"
|
||||
resolved "https://registry.yarnpkg.com/ng2-file-upload/-/ng2-file-upload-1.4.0.tgz#8dea28d573234c52af474ad2a4001b335271e5c4"
|
||||
integrity sha512-3J/KPU/tyh/ad6TFeUbrxX+SihUj0iOEt2Zsg4EX7mB3GFiQscXOfcUOxCkBtPWWWaqt3azrYbVGzsYa3/7NzQ==
|
||||
dependencies:
|
||||
tslib "^1.9.0"
|
||||
|
||||
ngp-sort-pipe@^0.0.4:
|
||||
version "0.0.4"
|
||||
resolved "https://registry.yarnpkg.com/ngp-sort-pipe/-/ngp-sort-pipe-0.0.4.tgz#9d70caff0ee34f32f2ea1df16c7333b72df72b56"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user