Skip to content

Commit

Permalink
Hide the crop controls in content only mode
Browse files Browse the repository at this point in the history
  • Loading branch information
talldan committed Jan 17, 2024
1 parent 46b853b commit 2cf4c3c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/block-library/src/image/image.js
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,11 @@ export default function Image( {
}, [ isSelected ] );

const canEditImage = id && naturalWidth && naturalHeight && imageEditing;
const allowCrop = ! multiImageSelection && canEditImage && ! isEditingImage;
const allowCrop =
! multiImageSelection &&
canEditImage &&
! isEditingImage &&
hasNonContentControls;

function switchToCover() {
replaceBlocks(
Expand Down

0 comments on commit 2cf4c3c

Please sign in to comment.