This commit is contained in:
Rainer Simon 2021-04-04 09:12:02 +02:00
parent 0c9e7fba1a
commit ad47392c13
1 changed files with 2 additions and 1 deletions

View File

@ -158,7 +158,8 @@ const Editor = props => {
}) : false; }) : false;
const hasDelete = currentAnnotation && 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, !props.readOnly && // we are not in read-only config,
!currentAnnotation.isSelection && // this is not a selection, and !currentAnnotation.isSelection && // this is not a selection, and
!widgets.some(isReadOnlyWidget); // every widget is deletable !widgets.some(isReadOnlyWidget); // every widget is deletable