Merge branch 'VM/RED-7980' into 'master'
RED-7980 - stop searching when another page has been reached Closes RED-7980 See merge request redactmanager/red-ui!352
This commit is contained in:
commit
65f2ef0e74
@ -313,8 +313,12 @@ export class FileDataService extends EntitiesService<AnnotationWrapper, Annotati
|
|||||||
|
|
||||||
#findOriginalAnnotation(annotations: AnnotationWrapper[], pendingEntry: IEntityLogEntry) {
|
#findOriginalAnnotation(annotations: AnnotationWrapper[], pendingEntry: IEntityLogEntry) {
|
||||||
for (let i = annotations.length - 1; i >= 0; i--) {
|
for (let i = annotations.length - 1; i >= 0; i--) {
|
||||||
if (annotations[i].id === pendingEntry.id) {
|
const annotation = annotations[i];
|
||||||
return annotations[i];
|
if (annotation.positions[0].page !== pendingEntry.positions[0].pageNumber) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (annotation.id === pendingEntry.id) {
|
||||||
|
return annotation;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user