Skip to content

Commit

Permalink
PDFViewer now forwards Annotorious cancelSelected event
Browse files Browse the repository at this point in the history
  • Loading branch information
rsimon committed Sep 23, 2022
1 parent 64c163d commit 8b44b49
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/pdf/endless/AnnotatablePage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,8 @@ const AnnotatablePage = props => {
anno.on('createAnnotation', onCreateAnnotation);
anno.on('updateAnnotation', onUpdateAnnotation);
anno.on('deleteAnnotation', onDeleteAnnotation);
anno.on('cancelSelected', a => props.onCancelSelected(a));

setAnno(anno);

r.on('selectAnnotation', () => anno.selectAnnotation());
Expand Down
1 change: 1 addition & 0 deletions src/pdf/paginated/AnnotatablePage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ const AnnotatablePage = props => {
anno.on('createAnnotation', a => props.onCreateAnnotation(a));
anno.on('updateAnnotation', (a, p) => props.onUpdateAnnotation(a, p));
anno.on('deleteAnnotation', a => props.onDeleteAnnotation(a));
anno.on('cancelSelected', a => props.onCancelSelected(a));

anno.setAnnotations(image);
setAnno(anno);
Expand Down

0 comments on commit 8b44b49

Please sign in to comment.