RED-7296: delete drawn rectangle upon deselect.
This commit is contained in:
parent
be1c9c66f0
commit
394182b937
@ -141,6 +141,11 @@ export class REDAnnotationManager {
|
||||
this.#manager.addEventListener('annotationSelected', (annotations: Annotation[], action: string) => {
|
||||
this.#logger.info('[PDF] Annotation selected: ', annotations, action);
|
||||
this.#annotationSelected$.next([annotations, action]);
|
||||
|
||||
const annotation = annotations.length === 1 ? annotations[0] : undefined;
|
||||
if (annotation && annotation.ToolName === AnnotationToolNames.AnnotationCreateRectangle && action === 'deselected') {
|
||||
this.delete(annotation.Id);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user