Skip to content

Commit

Permalink
Closes #54
Browse files Browse the repository at this point in the history
  • Loading branch information
rsimon committed Apr 4, 2021
1 parent 0c9e7fb commit ad47392
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/editor/Editor.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,8 @@ const Editor = props => {
}) : false;

const hasDelete = currentAnnotation &&
currentAnnotation.bodies.length > 0 && // annotation has bodies,
// annotation has bodies or allowEmpty,
(currentAnnotation.bodies.length > 0 || props.config.allowEmpty) &&
!props.readOnly && // we are not in read-only config,
!currentAnnotation.isSelection && // this is not a selection, and
!widgets.some(isReadOnlyWidget); // every widget is deletable
Expand Down

0 comments on commit ad47392

Please sign in to comment.