Skip to content

Commit

Permalink
added comment to onResizeStop
Browse files Browse the repository at this point in the history
  • Loading branch information
Addison-Stavlo committed Feb 7, 2020
1 parent 3a57a79 commit eaa78c1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/block-library/src/image/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -677,6 +677,8 @@ export class ImageEdit extends Component {
delta
) => {
onResizeStop();
// Images saved with width (currentWidth) larger than the width of their parent block (maxWidth),
// will resize with poor behavior if we do not resize based on maxWidth in that circumstance.
if ( currentWidth > maxWidth ) {
setAttributes( {
width: parseInt( maxWidth + delta.width, 10 ),
Expand Down

0 comments on commit eaa78c1

Please sign in to comment.