Skip to content

Commit

Permalink
Recalculate height after aspect ratio change
Browse files Browse the repository at this point in the history
  • Loading branch information
ellatrix committed Jun 21, 2020
1 parent d0b20bf commit e226544
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/block-library/src/image/image-editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ export default function ImageEditor( {
setAttributes( {
id: response.media_id,
url: response.url,
height: width / aspect,
} );
}
} )
Expand Down Expand Up @@ -279,7 +280,6 @@ export default function ImageEditor( {
onCropChange={ setPosition }
onCropComplete={ setCrop }
onZoomChange={ setZoom }
onRotationChange={ setRotation }
/>
{ inProgress && <Spinner /> }
</div>
Expand Down

0 comments on commit e226544

Please sign in to comment.